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
-
-
Constructor Summary
Constructors Constructor Description AuthorityBasedImpersonatePermissionVoter(boolean allowed, String authority)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isAllowedToImpersonateUser(Authentication authentication)
Returnstrue
if the authenticated user is allowed to impersonate another user.
-
-
-
Field Detail
-
allowed
protected final boolean allowed
-
authority
protected final String authority
-
-
Constructor Detail
-
AuthorityBasedImpersonatePermissionVoter
public AuthorityBasedImpersonatePermissionVoter(boolean allowed, String authority)
-
-
Method Detail
-
isAllowedToImpersonateUser
public boolean isAllowedToImpersonateUser(Authentication authentication)
Description copied from interface:ImpersonatePermissionVoter
Returnstrue
if the authenticated user is allowed to impersonate another user.- Specified by:
isAllowedToImpersonateUser
in interfaceImpersonatePermissionVoter
- Parameters:
authentication
- the authentication that should be checked- Returns:
true
if it is allowed to impersonate a user
-
-