public interface AccessService
| Modifier and Type | Field and Description |
|---|---|
static String |
SERVICE_NAME |
| 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
|
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
|
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
|
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
|
static final String SERVICE_NAME
<T extends SecurableEntity> org.springframework.data.jpa.domain.Specification<T> getSecuritySpecification(Permission permission)
permission - requested access level<T extends SecurableEntity> org.springframework.data.jpa.domain.Specification<T> getSecuritySpecification(User user, Permission permission)
user - userpermission - requested access levelPermission getPermission(SecurableEntity entity)
entity - entityPermission getPermission(SecurableEntity entity, User user)
entity - entityuser - userPermission getPermission(AccessList accessList, User user)
accessList - access listuser - userPermission getPermission(AccessList accessList)
accessList - access listAccessRecord getAccessRecord(AccessList accessList, IAccessorSupplier supplier)
accessList - access listsupplier - user / groupvoid grantPermission(SecurableEntity entity, IAccessorSupplier supplier, Permission permission)
entity - entitysupplier - user / grouppermission - rightsvoid grantPermission(SecurableEntity entity, IAccessorSupplier supplier, Permission permission, Boolean mandatory)
entity - entitysupplier - user / grouppermission - rightsmandatory - mandatory match attributevoid removeAccessor(SecurableEntity entity, IAccessorSupplier supplier)
entity - entitysupplier - user / groupvoid removeAccessor(AccessList entity, IAccessorSupplier supplier)
entity - access listsupplier - user / groupvoid grantPermission(AccessList entity, IAccessorSupplier supplier, Permission permission)
entity - access listsupplier - user / grouppermission - rightsvoid grantPermission(AccessList entity, IAccessorSupplier supplier, Permission permission, Boolean mandatory)
entity - access listsupplier - user / grouppermission - rightsmandatory - mandatory match attributevoid assignAccessList(SecurableEntity entity, AccessList accessList)
entity - entityaccessList - access listAccessList copy(AccessList accessList, AccessListType targetType)
accessList - оригинальный список доступаtargetType - целевой тип списка доступаCopyright © 2018–2021 Tesler. All rights reserved.