Package com.priint.pubserver.auth
Annotation Interface RequiresPermissions
The RequiresPermissions annotation requires the current Subject be permitted one or more permissions
in order to execute the annotated method.
The logical operation for the permission checks in case multiple permissions are specified. AND is the default
For example:
@RequiresPermissions("account:create")
public void createAccount(Account account) {
//this method will only be invoked by a Subject that is permitted to create an account
}
@RequiresPermissions({"account:manage", "account:create"})
public void createAccount(Account account) {
//this method will only be invoked by a Subject that is permitted to manage AND create an account.
}
-
Required Element Summary
Required Elements
-
Element Details
-
value
String[] valueThe permission string which will be passed toSubject.isPermitted(String)to determine if the user is allowed to invoke the code protected by this annotation.- Returns:
- the string [ ]
-