Class SelfEditorRelationshipPolicy

  • All Implemented Interfaces:
    edu.cornell.mannlib.vitro.webapp.auth.policy.ifaces.PolicyIface

    public class SelfEditorRelationshipPolicy
    extends edu.cornell.mannlib.vitro.webapp.auth.policy.specialrelationships.AbstractRelationshipPolicy
    implements edu.cornell.mannlib.vitro.webapp.auth.policy.ifaces.PolicyIface
    Permit self-editors to edit the properties of classes with which they share a special relationship. So for example: A self-editor may edit properties of an InformationResource for which he is an author, an editor, or in which he is featured. A self-editor may edit properties of a Project in which he plays a clinical role. Etc. NOTE: properties or resources which are restricted by namespace or by access setting will still not be editable, even if this special relationship applies. NOTE: This could be further generalized by building a list of authorizing relationships, where each relationship may specify a type of object, a relating property (or chain of properties), and a text message describing the relationship (to be used in the decision).
    • Field Summary

      • Fields inherited from class edu.cornell.mannlib.vitro.webapp.auth.policy.specialrelationships.AbstractRelationshipPolicy

        ctx
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      edu.cornell.mannlib.vitro.webapp.auth.policy.ifaces.PolicyDecision isAuthorized​(edu.cornell.mannlib.vitro.webapp.auth.identifier.IdentifierBundle whoToAuth, edu.cornell.mannlib.vitro.webapp.auth.requestedAction.RequestedAction whatToAuth)  
      String toString()  
      • Methods inherited from class edu.cornell.mannlib.vitro.webapp.auth.policy.specialrelationships.AbstractRelationshipPolicy

        canModifyPredicate, canModifyResource, cantModifyPredicate, cantModifyResource, inconclusiveDecision, userNotAuthorizedToStatement
    • Constructor Detail

      • SelfEditorRelationshipPolicy

        public SelfEditorRelationshipPolicy​(javax.servlet.ServletContext ctx)
    • Method Detail

      • isAuthorized

        public edu.cornell.mannlib.vitro.webapp.auth.policy.ifaces.PolicyDecision isAuthorized​(edu.cornell.mannlib.vitro.webapp.auth.identifier.IdentifierBundle whoToAuth,
                                                                                               edu.cornell.mannlib.vitro.webapp.auth.requestedAction.RequestedAction whatToAuth)
        Specified by:
        isAuthorized in interface edu.cornell.mannlib.vitro.webapp.auth.policy.ifaces.PolicyIface