public interface Authorizable<T extends Serializable> extends Named<T>
Application want's to authorize a domain object to several Roles, the domain-object needs to
implement Authorizable.Roles provided by the Application can be obtained by calling Application.getRoles().
Since the Roles are maintained by appNG and not by the Application itself, the Authorizable
just needs to maintain the IDs of the authorized Roles.javax.persistence.ElementCollection.
@ElementCollection
public List<Integer> getRoleIds() {
return roleIds;
}
Subject.isAuthorized(Authorizable),
Application.getRoles()| Modifier and Type | Method and Description |
|---|---|
List<Integer> |
getRoleIds()
Returns a list containing the IDs of all
Roles which are authorized to access this Authorizable. |
getDescription, getNamegetIdList<Integer> getRoleIds()
Roles which are authorized to access this Authorizable.Roles which are authorized to access this AuthorizableCopyright © 2011–2023 aiticon GmbH. All rights reserved.