public interface Authorizable<T extends Serializable> extends Named<T>
Application
want's to authorize a domain object to several Role
s, the domain-object needs to
implement Authorizable
.Role
s provided by the Application
can be obtained by calling Application.getRoles()
.
Since the Role
s are maintained by appNG and not by the Application
itself, the Authorizable
just needs to maintain the IDs of the authorized Role
s.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
Role s which are authorized to access this Authorizable . |
getDescription, getName
getId
List<Integer> getRoleIds()
Role
s which are authorized to access this Authorizable
.Role
s which are authorized to access this Authorizable
Copyright © 2011–2023 aiticon GmbH. All rights reserved.