Class PersistPermissionServiceImpl
java.lang.Object
ch.tocco.nice2.persist.security.impl.PersistPermissionServiceImpl
- All Implemented Interfaces:
PersistPermissionService
@Component
public class PersistPermissionServiceImpl
extends Object
implements PersistPermissionService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
hasEntityManagerPermission
(String entityModel, Permission... permissions) boolean
hasEntityManagerPermission
(String entityModel, String... permissions) Returns true if all specified permissions are granted to the current user for the specified entity model.boolean
hasEntityPermission
(String entityModel, String primaryKey, String... permissions) Checks the all specified permissions against the current user and the specified entity.
-
Constructor Details
-
PersistPermissionServiceImpl
-
-
Method Details
-
hasEntityManagerPermission
Description copied from interface:PersistPermissionService
Returns true if all specified permissions are granted to the current user for the specified entity model.- Specified by:
hasEntityManagerPermission
in interfacePersistPermissionService
- Parameters:
entityModel
- the entity modelpermissions
- the permission to check- Returns:
- true if granted, false otherwise
-
hasEntityManagerPermission
- Specified by:
hasEntityManagerPermission
in interfacePersistPermissionService
-
hasEntityPermission
Description copied from interface:PersistPermissionService
Checks the all specified permissions against the current user and the specified entity.- Specified by:
hasEntityPermission
in interfacePersistPermissionService
- Parameters:
entityModel
- the entity modelprimaryKey
- a primary key that identifies an existing entitypermissions
- the permissions to check- Returns:
- true, if all specified permissions are granted
-