Class MCRFactsAccessSystem

java.lang.Object
org.mycore.access.facts.MCRFactsAccessSystem
All Implemented Interfaces:
MCRAccessInterface, MCRAccessCheckStrategy

@Singleton public class MCRFactsAccessSystem extends Object implements MCRAccessInterface, MCRAccessCheckStrategy
base class for XML fact based access system enabled it with the 2 properties: MCR.Access.Class=org.mycore.access.facts.MCRFactsAccessSystem MCR.Access.Strategy.Class=org.mycore.access.facts.MCRFactsAccessSystem
  • Field Details

    • LOGGER

      protected static final Logger LOGGER
  • Constructor Details

    • MCRFactsAccessSystem

      public MCRFactsAccessSystem()
  • Method Details

    • init

      public void init(String property)
    • setRulesURI

      public void setRulesURI(String uri)
    • getProperties

      public Map<String,String> getProperties()
    • setProperties

      public void setProperties(Map<String,String> properties)
    • checkPermission

      public boolean checkPermission(String id, String permission)
      Description copied from interface: MCRAccessInterface
      determines whether the current user has the permission to perform a certain action.
      Specified by:
      checkPermission in interface MCRAccessCheckStrategy
      Specified by:
      checkPermission in interface MCRAccessInterface
      Parameters:
      id - the MCRObjectID of the object
      permission - the access permission for the rule
      Returns:
      true if the access is allowed otherwise it return
      See Also:
    • checkPermissionForUser

      public boolean checkPermissionForUser(String permission, MCRUserInformation userInfo)
      Description copied from interface: MCRAccessInterface
      determines whether a given user has the permission to perform a certain action. no session data will be checked here. This method is used for checking "a priori permissions" like "create-document" where a String ID does not exist yet
      Specified by:
      checkPermissionForUser in interface MCRAccessInterface
      Parameters:
      permission - the permission/action to be granted, e.g. "create-document"
      userInfo - the MCRUser, whose permissions are checked
      Returns:
      true if the permission is granted, else false
    • checkPermission

      public boolean checkPermission(String checkID, String permission, List<MCRFact> baseFacts)
    • checkPermission

      public boolean checkPermission(String checkID, String permission, MCRUserInformation userInfo)
      Description copied from interface: MCRAccessInterface
      determines whether a given user has the permission to perform a certain action. no session data will be checked here. The parameter id serves as an identifier for the concrete underlying rule, e.g. a MCRObjectID.
      Specified by:
      checkPermission in interface MCRAccessInterface
      Parameters:
      checkID - the ID-String of the object
      permission - the permission/action to be granted, e.g. "read"
      userInfo - the MCRUser, whose permissions are checked
      Returns:
      true if the permission is granted, else false
    • checkPermission

      public boolean checkPermission(String permission)
      Description copied from interface: MCRAccessInterface
      determines whether the current user has the permission to perform a certain action. All information regarding the current user is capsulated by a MCRSession instance which can be retrieved by
       MCRSession currentSession = MCRSessionMgr.getCurrentSession();
       
      This method is used for checking "a priori permissions" like "create-document" where a String ID does not exist yet
      Specified by:
      checkPermission in interface MCRAccessInterface
      Parameters:
      permission - the permission/action to be granted, e.g. "create-document"
      Returns:
      true if the permission is granted, else false
      See Also: