RequiresPermissions

<p> Requires the current executor's Subject to imply a particular permission in order to execute the annotated method. If the executor's associated {@link hunt.shiro.subject.Subject Subject} determines that the executor does not imply the specified permission, the method will not be executed. </p>

<p>For example, this declaration: <p/> <code>&#64;RequiresPermissions( {"file:read", "write:aFile.txt"} )<br/> void someMethod();</code> <p/> indicates the current user must be able to both <tt>read</tt> and <tt>write</tt> to the file <tt>aFile.txt</tt> in order for the <tt>someMethod()</tt> to execute, otherwise an {@link hunt.shiro.authz.AuthorizationException AuthorizationException} will be thrown.

@see hunt.shiro.subject.Subject#checkPermission

interface RequiresPermissions {}

Members

Functions

logical
Logical logical()

The logical operation for the permission checks in case multiple roles are specified. AND is the default

value
string[] value()

The permission string which will be passed to {@link hunt.shiro.subject.Subject#isPermitted(string)} to determine if the user is allowed to invoke the code protected by this annotation.

Meta