Class UserACL

java.lang.Object
org.exoplatform.portal.config.UserACL

public class UserACL extends Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    UserACL(org.exoplatform.container.xml.InitParams params)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    org.exoplatform.services.security.Authenticator
     
    org.exoplatform.services.security.Identity
     
    org.exoplatform.services.security.IdentityRegistry
     
    org.exoplatform.services.security.Identity
    Retrieves the User ACL Identity from Registry, else build it from OrganizationService using Authenticator.createIdentity(String)
    boolean
    hasAccessPermission(org.exoplatform.portal.config.model.Page page, org.exoplatform.services.security.Identity identity)
    Checks whether a designated Identity has access permission on designated Page or not
    boolean
    hasAccessPermission(org.exoplatform.portal.config.model.PortalConfig portalConfig, org.exoplatform.services.security.Identity identity)
    Checks whether a designated Identity has access permission on designated Site or not
    boolean
    hasAccessPermission(org.exoplatform.portal.mop.page.PageContext pageContext, org.exoplatform.services.security.Identity identity)
    Checks whether a designated Identity has access permission on designated Page or not
    boolean
    hasAccessPermission(org.exoplatform.services.security.Identity identity, String ownerType, String ownerId, String[] expressions)
     
    boolean
    hasAccessPermission(org.exoplatform.services.security.Identity identity, String ownerType, String ownerId, List<String> expressions)
     
    boolean
    hasAccessPermission(org.exoplatform.services.security.Identity identity, String ownerType, String ownerId, Stream<String> expressionsStream)
     
    boolean
    hasCreatePortalPermission(org.exoplatform.services.security.Identity identity)
    Check whether the designated Identity has permissions to create a new Site of type PORTAL
    boolean
    hasEditPermission(org.exoplatform.portal.config.model.Page page, org.exoplatform.services.security.Identity identity)
    Checks whether a designated Identity has edit permission on designated Page or not
    boolean
    hasEditPermission(org.exoplatform.portal.config.model.PortalConfig portalConfig, org.exoplatform.services.security.Identity identity)
    Checks whether a designated Identity has edit permission on designated PortalConfig or not
    boolean
    hasEditPermission(org.exoplatform.portal.mop.page.PageContext pageContext, org.exoplatform.services.security.Identity identity)
    Checks whether a designated Identity has edit permission on designated PageContext or not
    boolean
    hasEditPermission(org.exoplatform.services.security.Identity identity, String ownerType, String ownerId, String expression)
     
    boolean
    hasPermission(org.exoplatform.services.security.Identity identity, String expression)
     
    boolean
    hasPermission(org.exoplatform.services.security.Identity identity, String[] expressions)
     
    boolean
    hasPermission(org.exoplatform.services.security.Identity identity, String membershipType, String groupId)
     
    boolean
    hasPermission(org.exoplatform.services.security.Identity identity, org.exoplatform.services.organization.Group group, String pluginId)
     
    boolean
    isAdministrator(org.exoplatform.services.security.Identity identity)
    Checks whether a designated Identity is a super administrator or a member of manager:/platform/administrators
    boolean
     
    boolean
    isAnonymousUser(org.exoplatform.services.security.Identity identity)
     
    boolean
     
    boolean
    isMemberOf(org.exoplatform.services.security.Identity identity, String expression)
    Checks whether user is member of a groupId or membershipType:groupId
    boolean
    isMemberOf(org.exoplatform.services.security.Identity identity, String membershipType, String groupId)
     
    boolean
    isSuperUser(org.exoplatform.services.security.Identity identity)
    Checks whether a designated Identity is the super user of platform or not
    boolean
    isUserInGroup(org.exoplatform.services.security.Identity identity, String group)
    Checks whether the designated Identity belongs to a designated group or not

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • UserACL

      public UserACL(org.exoplatform.container.xml.InitParams params)
  • Method Details

    • addGroupVisibilityPlugin

      public void addGroupVisibilityPlugin(GroupVisibilityPlugin plugin)
    • hasPermission

      public boolean hasPermission(org.exoplatform.services.security.Identity identity, org.exoplatform.services.organization.Group group, String pluginId)
    • getUserIdentity

      public org.exoplatform.services.security.Identity getUserIdentity(String username)
      Retrieves the User ACL Identity from Registry, else build it from OrganizationService using Authenticator.createIdentity(String)
      Parameters:
      username -
      Returns:
    • isSuperUser

      public boolean isSuperUser(org.exoplatform.services.security.Identity identity)
      Checks whether a designated Identity is the super user of platform or not
      Returns:
      true if super user, else false
    • isAdministrator

      public boolean isAdministrator(org.exoplatform.services.security.Identity identity)
      Checks whether a designated Identity is a super administrator or a member of manager:/platform/administrators
      Parameters:
      identity - Identity to check
      Returns:
      true if is an administrator, else false
    • hasCreatePortalPermission

      public boolean hasCreatePortalPermission(org.exoplatform.services.security.Identity identity)
      Check whether the designated Identity has permissions to create a new Site of type PORTAL
      Parameters:
      identity - Identity
      Returns:
      true if has site creation permission else false
    • hasEditPermission

      public boolean hasEditPermission(org.exoplatform.portal.config.model.PortalConfig portalConfig, org.exoplatform.services.security.Identity identity)
      Checks whether a designated Identity has edit permission on designated PortalConfig or not
      Parameters:
      portalConfig -
      identity -
      Returns:
      true if have edit permission else false
    • hasEditPermission

      public boolean hasEditPermission(org.exoplatform.portal.config.model.Page page, org.exoplatform.services.security.Identity identity)
      Checks whether a designated Identity has edit permission on designated Page or not
      Parameters:
      page -
      identity -
      Returns:
      true if have edit permission else false
    • hasEditPermission

      public boolean hasEditPermission(org.exoplatform.portal.mop.page.PageContext pageContext, org.exoplatform.services.security.Identity identity)
      Checks whether a designated Identity has edit permission on designated PageContext or not
      Parameters:
      pageContext -
      identity -
      Returns:
      true if have edit permission else false
    • hasAccessPermission

      public boolean hasAccessPermission(org.exoplatform.portal.config.model.PortalConfig portalConfig, org.exoplatform.services.security.Identity identity)
      Checks whether a designated Identity has access permission on designated Site or not
      Parameters:
      portalConfig -
      identity -
      Returns:
      true if have access permission else false
    • hasAccessPermission

      public boolean hasAccessPermission(org.exoplatform.portal.config.model.Page page, org.exoplatform.services.security.Identity identity)
      Checks whether a designated Identity has access permission on designated Page or not
      Parameters:
      page -
      identity -
      Returns:
      true if have access permission else false
    • hasAccessPermission

      public boolean hasAccessPermission(org.exoplatform.portal.mop.page.PageContext pageContext, org.exoplatform.services.security.Identity identity)
      Checks whether a designated Identity has access permission on designated Page or not
      Parameters:
      pageContext -
      identity -
      Returns:
      true if have access permission else false
    • isUserInGroup

      public boolean isUserInGroup(org.exoplatform.services.security.Identity identity, String group)
      Checks whether the designated Identity belongs to a designated group or not
      Parameters:
      identity - Identity
      group - groupId
      Returns:
      true if has an associated memberdshipType with this group else false
    • getIdentity

      public org.exoplatform.services.security.Identity getIdentity()
    • hasPermission

      public boolean hasPermission(org.exoplatform.services.security.Identity identity, String[] expressions)
    • hasPermission

      public boolean hasPermission(org.exoplatform.services.security.Identity identity, String expression)
    • hasPermission

      public boolean hasPermission(org.exoplatform.services.security.Identity identity, String membershipType, String groupId)
    • isMemberOf

      public boolean isMemberOf(org.exoplatform.services.security.Identity identity, String expression)
      Checks whether user is member of a groupId or membershipType:groupId
      Parameters:
      identity - Identity to check
      expression - permission expression of type groupId or membershipType:groupId
      Returns:
      true if is member, else false
    • isMemberOf

      public boolean isMemberOf(org.exoplatform.services.security.Identity identity, String membershipType, String groupId)
    • hasEditPermission

      public boolean hasEditPermission(org.exoplatform.services.security.Identity identity, String ownerType, String ownerId, String expression)
    • hasAccessPermission

      public boolean hasAccessPermission(org.exoplatform.services.security.Identity identity, String ownerType, String ownerId, String[] expressions)
    • hasAccessPermission

      public boolean hasAccessPermission(org.exoplatform.services.security.Identity identity, String ownerType, String ownerId, List<String> expressions)
    • hasAccessPermission

      public boolean hasAccessPermission(org.exoplatform.services.security.Identity identity, String ownerType, String ownerId, Stream<String> expressionsStream)
    • isGuestsGroup

      public boolean isGuestsGroup(String groupId)
    • isAnonymousUser

      public boolean isAnonymousUser(org.exoplatform.services.security.Identity identity)
    • isAnonymousUser

      public boolean isAnonymousUser(String username)
    • getAuthenticator

      public org.exoplatform.services.security.Authenticator getAuthenticator()
    • getIdentityRegistry

      public org.exoplatform.services.security.IdentityRegistry getIdentityRegistry()