@Target(value={METHOD,TYPE}) @Retention(value=RUNTIME) @Inherited @Documented public @interface Authorized
For example, to require that the user have either View or Add privileges:
@Authorized ({"View Users", "Add User"})
public void getUsersByName(String name);
or to require that they have all privileges
@Authorized (value = {"Add Users", "Edit Users"}, requireAll=true)
public void getUsersByName(String name);
or to just require that they be authenticated:
@Authorized ()
public void getUsersByName(String name);
Modifier and Type | Optional Element and Description |
---|---|
boolean |
requireAll
If set to true, will require that the user have all privileges listed in
value . |
String[] |
value
Returns the list of privileges needed to access a method.
|
public abstract String[] value
requireAll
is set to trueCopyright © 2018 OpenMRS LLC.. All Rights Reserved.