Class DefaultGroupVisibilityPlugin

java.lang.Object
org.exoplatform.container.component.BaseComponentPlugin
org.exoplatform.portal.config.GroupVisibilityPlugin
org.exoplatform.portal.config.DefaultGroupVisibilityPlugin
All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin

public class DefaultGroupVisibilityPlugin extends GroupVisibilityPlugin
Default implementation of GroupVisibilityPlugin which allows to see a group if any of these conditions is fulfilled: * the given user is the super user * the given user is a platform administrator * the given user is a manager of the group
  • Field Summary

    Fields inherited from class org.exoplatform.container.component.BaseComponentPlugin

    desc, name
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    hasPermission(org.exoplatform.services.security.Identity userIdentity, org.exoplatform.services.organization.Group group)
    Check if the given identity can see the given group.

    Methods inherited from class org.exoplatform.container.component.BaseComponentPlugin

    getDescription, getName, setDescription, setName

    Methods inherited from class java.lang.Object

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

    • DefaultGroupVisibilityPlugin

      public DefaultGroupVisibilityPlugin(UserACL userACL)
  • Method Details

    • hasPermission

      public boolean hasPermission(org.exoplatform.services.security.Identity userIdentity, org.exoplatform.services.organization.Group group)
      Check if the given identity can see the given group. The methods org.exoplatform.services.security.Identity.isMemberOf(String, String) and org.exoplatform.portal.config.UserACL.hasPermission(Identity, String) are not used to return parent groups as well, in order to return a complete groups tree.
      Specified by:
      hasPermission in class GroupVisibilityPlugin
      Parameters:
      userIdentity - The user identity
      group - The group to check
      Returns:
      true if the user identity has permission to see the given group