Interface MCRAccessInterface

All Known Subinterfaces:
MCRRequestScopeACL, MCRRuleAccessInterface
All Known Implementing Classes:
MCRAccessBaseImpl, MCRAccessControlSystem, MCRFactsAccessSystem

public interface MCRAccessInterface
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    checkPermission(String permission)
    determines whether the current user has the permission to perform a certain action.
    boolean
    checkPermission(String id, String permission)
    determines whether the current user has the permission to perform a certain action.
    boolean
    checkPermission(String id, String permission, MCRUserInformation userInfo)
    determines whether a given user has the permission to perform a certain action. no session data will be checked here.
    boolean
    determines whether a given user has the permission to perform a certain action. no session data will be checked here.
  • Method Details

    • checkPermission

      boolean checkPermission(String permission)
      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
      Parameters:
      permission - the permission/action to be granted, e.g. "create-document"
      Returns:
      true if the permission is granted, else false
      See Also:
    • checkPermission

      boolean checkPermission(String id, String permission)
      determines whether the current user has the permission to perform a certain action.
    • checkPermissionForUser

      boolean checkPermissionForUser(String permission, MCRUserInformation userInfo)
      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
      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

      boolean checkPermission(String id, String permission, MCRUserInformation userInfo)
      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.
      Parameters:
      id - 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