Interface CMSPermissionChecker
-
- All Known Implementing Classes:
DefaultCMSPermissionChecker
public interface CMSPermissionCheckerHelper service to check permissions
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanhasPermissionForContainedType(AttributeDescriptorModel attributeDescriptorModel, java.lang.String permissionName)Type permission checking to see if the current principal has permissions to perform the specified operation (e.g.
-
-
-
Method Detail
-
hasPermissionForContainedType
boolean hasPermissionForContainedType(AttributeDescriptorModel attributeDescriptorModel, java.lang.String permissionName)
Type permission checking to see if the current principal has permissions to perform the specified operation (e.g. read, change, create or remove) on the type of an attribute or not.- When the attribute is of type ComposedTypeModel, this method verifies that the type specified in the ComposedTypeModel is manageable by the current user.
- When the attribute is of type AtomicTypeModel, no additional type checking needs to be done. This will always
return
TRUE.
Possible scenarios are listed in the table below:
Sample Attribute Attribute Expected Result String nameAtomic type always TRUEMedia mediaComposed type TRUEwhen user has permission for Media typeList<MediaModel> mediaCollection of Composed type TRUEwhen user has permission for Media typeMap<String, MediaModel> mediaLocalized Composed type TRUEwhen user has permission for Media typeMap<String, List<MediaModel>> mediaLocalized Collection of Composed type TRUEwhen user has permission for Media type- Parameters:
attribute- - The descriptor that specifies the attribute whose read permission to check.permissionName- - The name of the permission to be checked; valid values defined inPermissionsConstants- Returns:
- true if the current principal has been granted change permission on the type contained in the
non-primitive attribute or the attribute is of type
AtomicTypeModel; false otherwise.
-
-