Skip to content
Snippets Groups Projects
Commit 21c4fa60 authored by izabel's avatar izabel
Browse files

[LMS-1615] improved javadoc

SVN: 16995
parent 6f50c826
No related branches found
No related tags found
No related merge requests found
...@@ -26,9 +26,6 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.RoleWithHierarchy; ...@@ -26,9 +26,6 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.RoleWithHierarchy;
/** /**
* The roles that are allowed to execute an <i>openBIS</i> method. * The roles that are allowed to execute an <i>openBIS</i> method.
* <p>
* {@link #value()} is additive.
* </p>
* *
* @author Christian Ribeaud * @author Christian Ribeaud
*/ */
...@@ -38,10 +35,8 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.RoleWithHierarchy; ...@@ -38,10 +35,8 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.RoleWithHierarchy;
public @interface RolesAllowed public @interface RolesAllowed
{ {
/** /**
* The set of roles that are allowed to execute a method. * The set of roles that are allowed to execute a method. The method will be accessible by all
* <p> * users with a role defined in any of {@link RoleWithHierarchy#getRoles()}.
* Should be the primary choice to specify roles.
* </p>
*/ */
RoleWithHierarchy[] value() default {}; RoleWithHierarchy[] value() default {};
......
...@@ -26,12 +26,23 @@ import com.google.gwt.user.client.rpc.IsSerializable; ...@@ -26,12 +26,23 @@ import com.google.gwt.user.client.rpc.IsSerializable;
* {@link RoleWithHierarchy}s that are stronger. * {@link RoleWithHierarchy}s that are stronger.
* <p> * <p>
* Available roles can: * Available roles can:
* <ol>
* <li>be presented to the user * <li>be presented to the user
* <li>be easily mapped to database structure * <li>be easily mapped to database structure
* <li>be used to restrict access to server methods * <li>be used to restrict access to server methods
* <li>define the role hierarchy by specifying which roles are stronger (users that have only the * <li>define the role hierarchy by specifying which roles are stronger (users that have only the
* "stronger" role will also be able to access given server method) * "stronger" role will also be able to access given server method)
* </ol>
* </p> * </p>
* <h4>Example:</h4>To annotate an interface method with a new role e.g. <code>SERCRET_AGENT</code>:
* <ol>
* <li>Add <code>SECRET_AGENT</code> to {@link RoleCode} enumerator.
* <li>Add <code>SECRET_AGENT</code> to <code>authorization_role</code> domain in the database (and
* prepare migration).
* <li>Add <code>INSTANCE_SECRET_AGENT</code> (or <code>SPACE_SECRET_AGENT</code>) to
* {@link RoleWithHierarchy} enumerator and define the "stronger" roles.
* <li>Use the new {@link RoleWithHierarchy} to annotate the interface method.
* </ol>
* *
* @author Izabela Adamczyk * @author Izabela Adamczyk
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment