Class EditByRolePermission
- java.lang.Object
-
- edu.cornell.mannlib.vitro.webapp.auth.permissions.Permission
-
- edu.cornell.mannlib.vitro.webapp.auth.permissions.EditByRolePermission
-
- All Implemented Interfaces:
Comparable<Permission>
public class EditByRolePermission extends Permission
Is the user authorized to edit properties that are marked as restricted to a certain "Role Level"?
-
-
Field Summary
Fields Modifier and Type Field Description static StringNAMESPACE-
Fields inherited from class edu.cornell.mannlib.vitro.webapp.auth.permissions.Permission
uri
-
-
Constructor Summary
Constructors Constructor Description EditByRolePermission(String roleName, BaseResourceBean.RoleLevel roleLevel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisAuthorized(RequestedAction whatToAuth)If the requested action is to edit a property statement, we might authorize it based on their role level.StringtoString()-
Methods inherited from class edu.cornell.mannlib.vitro.webapp.auth.permissions.Permission
compareTo, equals, getUri, hashCode
-
-
-
-
Field Detail
-
NAMESPACE
public static final String NAMESPACE
-
-
Constructor Detail
-
EditByRolePermission
public EditByRolePermission(String roleName, BaseResourceBean.RoleLevel roleLevel)
-
-
Method Detail
-
isAuthorized
public boolean isAuthorized(RequestedAction whatToAuth)
If the requested action is to edit a property statement, we might authorize it based on their role level.- Specified by:
isAuthorizedin classPermission
-
toString
public String toString()
- Overrides:
toStringin classPermission
-
-