Package com.priint.pubserver.auth
Annotation Type RequiresPermissions
-
@Target({TYPE,METHOD}) @Retention(RUNTIME) public @interface RequiresPermissionsThe 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 defaultFor 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 Modifier and Type Required Element Description java.lang.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.
-