@Service(value="accessService") public class BaseAccessService extends Object implements AccessService
SERVICE_NAME| Constructor and Description |
|---|
BaseAccessService() |
| Modifier and Type | Method and Description |
|---|---|
void |
assignAccessList(SecurableEntity entity,
AccessList accessList)
Assigns an access list to an entity
|
AccessList |
copy(AccessList accessList,
AccessListType targetType)
Copies the existing access list and assigns the appropriate type
|
AccessRecord |
getAccessRecord(AccessList accessList,
IAccessorSupplier supplier)
Returns a record of the user / group's access rights
|
protected Set<Long> |
getAllUserGroups() |
protected int |
getMaxInlineUserGroups() |
Permission |
getPermission(AccessList accessList)
Returns the rights of the current user
|
Permission |
getPermission(AccessList accessList,
User user)
Returns the rights of the specified user
|
Permission |
getPermission(SecurableEntity entity)
Returns the rights of the current user
|
Permission |
getPermission(SecurableEntity entity,
User user)
Returns the rights of the specified user
|
<T extends SecurableEntity> |
getSecuritySpecification(Permission permission)
Returns the security specification for getting a list of entities
for the current user and the requested access level
|
<T extends SecurableEntity> |
getSecuritySpecification(User user,
Permission permission)
Returns the security specification for getting a list of entities
for the specified user and the requested access level
|
protected User |
getSessionUser() |
void |
grantPermission(AccessList entity,
IAccessorSupplier supplier,
Permission permission)
Grants rights to the specified user / group
|
void |
grantPermission(AccessList entity,
IAccessorSupplier supplier,
Permission permission,
Boolean mandatory)
Grants rights to the specified user / group
|
void |
grantPermission(SecurableEntity entity,
IAccessorSupplier supplier,
Permission permission)
Grants rights to the specified user / group, after copying
access list if not private
|
void |
grantPermission(SecurableEntity entity,
IAccessorSupplier supplier,
Permission permission,
Boolean mandatory)
Grants rights to the specified user / group, after copying
access list if not private
|
protected boolean |
isMACLEnabled() |
void |
removeAccessor(AccessList entity,
IAccessorSupplier supplier)
Deletes the entry on the access right of the specified user / group
|
void |
removeAccessor(SecurableEntity entity,
IAccessorSupplier supplier)
Deletes the entry on the access right of the specified user / group, after copying
access list if not private
|
protected User getSessionUser()
protected int getMaxInlineUserGroups()
protected boolean isMACLEnabled()
public <T extends SecurableEntity> org.springframework.data.jpa.domain.Specification<T> getSecuritySpecification(Permission permission)
AccessServicegetSecuritySpecification in interface AccessServicepermission - requested access levelpublic <T extends SecurableEntity> org.springframework.data.jpa.domain.Specification<T> getSecuritySpecification(User user, Permission permission)
AccessServicegetSecuritySpecification in interface AccessServiceuser - userpermission - requested access levelpublic Permission getPermission(SecurableEntity entity)
AccessServicegetPermission in interface AccessServiceentity - entitypublic Permission getPermission(SecurableEntity entity, User user)
AccessServicegetPermission in interface AccessServiceentity - entityuser - userpublic Permission getPermission(AccessList accessList)
AccessServicegetPermission in interface AccessServiceaccessList - access listpublic Permission getPermission(AccessList accessList, User user)
AccessServicegetPermission in interface AccessServiceaccessList - access listuser - userpublic AccessRecord getAccessRecord(AccessList accessList, IAccessorSupplier supplier)
AccessServicegetAccessRecord in interface AccessServiceaccessList - access listsupplier - user / grouppublic void grantPermission(SecurableEntity entity, IAccessorSupplier supplier, Permission permission)
AccessServicegrantPermission in interface AccessServiceentity - entitysupplier - user / grouppermission - rightspublic void grantPermission(SecurableEntity entity, IAccessorSupplier supplier, Permission permission, Boolean mandatory)
AccessServicegrantPermission in interface AccessServiceentity - entitysupplier - user / grouppermission - rightsmandatory - mandatory match attributepublic void removeAccessor(SecurableEntity entity, IAccessorSupplier supplier)
AccessServiceremoveAccessor in interface AccessServiceentity - entitysupplier - user / grouppublic void grantPermission(AccessList entity, IAccessorSupplier supplier, Permission permission)
AccessServicegrantPermission in interface AccessServiceentity - access listsupplier - user / grouppermission - rightspublic void grantPermission(AccessList entity, IAccessorSupplier supplier, Permission permission, Boolean mandatory)
AccessServicegrantPermission in interface AccessServiceentity - access listsupplier - user / grouppermission - rightsmandatory - mandatory match attributepublic void removeAccessor(AccessList entity, IAccessorSupplier supplier)
AccessServiceremoveAccessor in interface AccessServiceentity - access listsupplier - user / grouppublic void assignAccessList(SecurableEntity entity, AccessList accessList)
AccessServiceassignAccessList in interface AccessServiceentity - entityaccessList - access listpublic AccessList copy(AccessList accessList, AccessListType targetType)
AccessServicecopy in interface AccessServiceaccessList - оригинальный список доступаtargetType - целевой тип списка доступаCopyright © 2018–2021 Tesler. All rights reserved.