public class ASMCMSUserGroupRestrictionEvaluator extends java.lang.Object implements CMSRestrictionEvaluator<ASMCMSUserGroupRestrictionModel>
Evaluates to true in the following cases,
1) If ASM agent is in Session, then both ASM Agent and current user should be part of Restricted group.
2) If ASM agent is not in Session, then current user should be part of Restricted group.
| Constructor and Description |
|---|
ASMCMSUserGroupRestrictionEvaluator() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkWhetherUserIsPartOfRestrictedGroup(UserModel userModel,
ASMCMSUserGroupRestrictionModel asmCMSUserGroupRestrictionModel)
Checks Whether the supplied User is part of the Restricted Groups
|
boolean |
evaluate(ASMCMSUserGroupRestrictionModel asmCMSUserGroupRestrictionModel,
RestrictionData context)
Main method that evaluates given restriction.
|
protected SessionService |
getSessionService() |
protected java.util.List<PrincipalGroupModel> |
getSubgroups(java.util.Collection<PrincipalGroupModel> groups)
Fetches all Subgroups of the supplied groups.
|
protected UserService |
getUserService() |
void |
setSessionService(SessionService sessionService) |
void |
setUserService(UserService userService) |
public boolean evaluate(ASMCMSUserGroupRestrictionModel asmCMSUserGroupRestrictionModel, RestrictionData context)
CMSRestrictionEvaluatorevaluate in interface CMSRestrictionEvaluator<ASMCMSUserGroupRestrictionModel>asmCMSUserGroupRestrictionModel - given restrictioncontext - all context information required to evaluate restrictiontrue when restriction is matched otherwise falseprotected boolean checkWhetherUserIsPartOfRestrictedGroup(UserModel userModel, ASMCMSUserGroupRestrictionModel asmCMSUserGroupRestrictionModel)
userModel - asmCMSUserGroupRestrictionModel - protected java.util.List<PrincipalGroupModel> getSubgroups(java.util.Collection<PrincipalGroupModel> groups)
groups - public void setUserService(UserService userService)
public void setSessionService(SessionService sessionService)
protected UserService getUserService()
protected SessionService getSessionService()
Copyright © 2018 SAP SE. All Rights Reserved.