Class AccessRightsManager
- java.lang.Object
-
- de.hybris.platform.odata2webservicesfeaturetests.useraccess.AccessRightsManager
-
public class AccessRightsManager extends java.lang.ObjectA utility for managing user access rights in the system. The implementation is not thread safe.
-
-
Constructor Summary
Constructors Constructor Description AccessRightsManager(@NotNull PermissionManagementService mgr)Instantiates this manager.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccessRightsManagerapply()Applies permissions explicitly set by callinggrant...orrevoke...methods to the user and type, which were specified by callingforUser(UserModel)andforType(ComposedTypeModel)respectively.AccessRightsManagerforType(ComposedTypeModel model)AccessRightsManagerforType(java.lang.String type)AccessRightsManagerforUser(UserModel model)AccessRightsManagerforUser(java.lang.String uid)AccessRightsManagergrantAll()AccessRightsManagergrantCreate()AccessRightsManagergrantDelete()AccessRightsManagergrantRead()AccessRightsManagergrantUpdate()AccessRightsManagerreset()Resets access rights to the state they were in the system prior to the first call of theapply()method on this manager.AccessRightsManagerrevokeAll()AccessRightsManagerrevokeCreate()AccessRightsManagerrevokeDelete()AccessRightsManagerrevokeRead()AccessRightsManagerrevokeUpdate()
-
-
-
Constructor Detail
-
AccessRightsManager
public AccessRightsManager(@NotNull @NotNull PermissionManagementService mgr)Instantiates this manager.- Parameters:
mgr- a service to use for managing user access permissions.
-
-
Method Detail
-
forUser
public AccessRightsManager forUser(java.lang.String uid)
-
forUser
public AccessRightsManager forUser(UserModel model)
-
forType
public AccessRightsManager forType(java.lang.String type)
-
forType
public AccessRightsManager forType(ComposedTypeModel model)
-
grantAll
public AccessRightsManager grantAll()
-
revokeAll
public AccessRightsManager revokeAll()
-
grantRead
public AccessRightsManager grantRead()
-
revokeRead
public AccessRightsManager revokeRead()
-
grantCreate
public AccessRightsManager grantCreate()
-
revokeCreate
public AccessRightsManager revokeCreate()
-
grantUpdate
public AccessRightsManager grantUpdate()
-
revokeUpdate
public AccessRightsManager revokeUpdate()
-
grantDelete
public AccessRightsManager grantDelete()
-
revokeDelete
public AccessRightsManager revokeDelete()
-
apply
public AccessRightsManager apply()
Applies permissions explicitly set by callinggrant...orrevoke...methods to the user and type, which were specified by callingforUser(UserModel)andforType(ComposedTypeModel)respectively.Permissions, for which no
grant...orrevoke...methods were not called will be unspecified.
-
reset
public AccessRightsManager reset()
Resets access rights to the state they were in the system prior to the first call of theapply()method on this manager.
-
-