Class AuthorityBasedImpersonatePermissionVoter

java.lang.Object
com.flowable.core.spring.security.switchuser.AuthorityBasedImpersonatePermissionVoter
All Implemented Interfaces:
ImpersonatePermissionVoter

public class AuthorityBasedImpersonatePermissionVoter extends Object implements ImpersonatePermissionVoter
Author:
Filip Hrisafov
  • Field Details

    • allowed

      protected final boolean allowed
    • authority

      protected final String authority
  • Constructor Details

    • AuthorityBasedImpersonatePermissionVoter

      public AuthorityBasedImpersonatePermissionVoter(boolean allowed, String authority)
  • Method Details

    • isAllowedToImpersonateUser

      public boolean isAllowedToImpersonateUser(Authentication authentication, UserDetails targetUser)
      Description copied from interface: ImpersonatePermissionVoter
      Returns true if the authenticated user is allowed to impersonate another user.
      Specified by:
      isAllowedToImpersonateUser in interface ImpersonatePermissionVoter
      Parameters:
      authentication - the authentication that should be checked
      targetUser - the user that is being impersonated
      Returns:
      true if it is allowed to impersonate a user