Class OrganizationalUnitService

java.lang.Object
io.meeds.social.organizationalunit.service.OrganizationalUnitService

@Service public class OrganizationalUnitService extends Object
  • Constructor Details

    • OrganizationalUnitService

      public OrganizationalUnitService()
  • Method Details

    • isOrganizationalUnit

      public boolean isOrganizationalUnit(String groupId)
    • getManagedOrganizationalUnits

      public List<OrganizationalUnit> getManagedOrganizationalUnits(String userName)
      Returns:
      the Organizational Units the given user directly manages (manager or * membership on the Organizational Unit group itself, not inherited from a parent group).
    • isManagedOrganizationalUnit

      public boolean isManagedOrganizationalUnit(String groupId, String userName)
      Returns:
      true if the given group is designated as an Organizational Unit that the given user directly manages (manager or * membership on the Organizational Unit group itself, not inherited from a parent group).
    • canManageGroup

      public boolean canManageGroup(String groupId, String userName)
      Whether the given group is inside the management perimeter of the given user: either an Organizational Unit the user directly manages, or a group nested, at any level, inside such an Organizational Unit.
      Parameters:
      groupId - group id to check
      userName - user name of the potential manager
      Returns:
      true if the given user can manage the given group
    • setOrganizationalUnit

      public void setOrganizationalUnit(String groupId, boolean organizationalUnit) throws Exception
      Throws:
      Exception