Class GroupPermissionsDelegate

  • All Implemented Interfaces:
    PermissionDelegate<com.atlassian.user.Group>

    public class GroupPermissionsDelegate
    extends Object
    implements PermissionDelegate<com.atlassian.user.Group>
    Class for checking operations on groups.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean canAdminister​(com.atlassian.user.User user, com.atlassian.user.Group target)
      Unsupported.
      boolean canCreate​(com.atlassian.user.User user, Object container)
      Determines if the specified user has permissions to create groups
      boolean canCreateInTarget​(com.atlassian.user.User user, Class typeToCreate)  
      boolean canEdit​(com.atlassian.user.User user, com.atlassian.user.Group group)
      Determines if the specified user can modify the membership (add/remove users) from the target group.
      boolean canExport​(com.atlassian.user.User user, com.atlassian.user.Group target)
      Unsupported.
      boolean canRemove​(com.atlassian.user.User user, com.atlassian.user.Group target)
      Determines if the specified user can remove the target group.
      boolean canSetPermissions​(com.atlassian.user.User user, com.atlassian.user.Group target)
      Determines if the specified user can assign new permissions to or remove existing permissions from the target group.
      boolean canView​(com.atlassian.user.User user)  
      boolean canView​(com.atlassian.user.User user, com.atlassian.user.Group target)
      Determines if the specified user can view the target group.
      void setSpacePermissionManager​(SpacePermissionManager spacePermissionManager)  
    • Constructor Detail

      • GroupPermissionsDelegate

        public GroupPermissionsDelegate()
    • Method Detail

      • canView

        public boolean canView​(com.atlassian.user.User user,
                               com.atlassian.user.Group target)
        Determines if the specified user can view the target group.
        Specified by:
        canView in interface PermissionDelegate<com.atlassian.user.Group>
        Returns:
        true, always (according to the current implementation).
      • canView

        public boolean canView​(com.atlassian.user.User user)
        Specified by:
        canView in interface PermissionDelegate<com.atlassian.user.Group>
        Returns:
        true if the user can view all instances of targets handled by this permission delegate
      • canEdit

        public boolean canEdit​(com.atlassian.user.User user,
                               com.atlassian.user.Group group)
        Determines if the specified user can modify the membership (add/remove users) from the target group. Only Confluence administrators and System administrators can modify most groups. Only system administrators can modify groups with system administrator permissions (or the confluence-administrator super group).
        Specified by:
        canEdit in interface PermissionDelegate<com.atlassian.user.Group>
        Parameters:
        group - group to be modified (type Group)
        Returns:
        true if the specified user can modify the target group, false otherwise.
      • canRemove

        public boolean canRemove​(com.atlassian.user.User user,
                                 com.atlassian.user.Group target)
        Determines if the specified user can remove the target group. Only Confluence administrators and System administrators can remove most groups. Only system administrators can remove groups with system administrators permissions (or the confluence-administrator super group).
        Specified by:
        canRemove in interface PermissionDelegate<com.atlassian.user.Group>
        Returns:
        true if the specified user can remove the target group, false otherwise.
      • canCreate

        public boolean canCreate​(com.atlassian.user.User user,
                                 Object container)
        Determines if the specified user has permissions to create groups
        Specified by:
        canCreate in interface PermissionDelegate<com.atlassian.user.Group>
        Parameters:
        container - not required. Null can be specified here as it is not used at the moment.
        Returns:
        true if the specified user has permissions to create groups.
      • canCreateInTarget

        public boolean canCreateInTarget​(com.atlassian.user.User user,
                                         Class typeToCreate)
        Specified by:
        canCreateInTarget in interface PermissionDelegate<com.atlassian.user.Group>
        Parameters:
        user - the user performing the create
        typeToCreate - the class of the entity to create
        Returns:
        true if the specified user can create new instances of the specified typeToCreate within instances of target handled by this PermissionDelegate.
      • canExport

        public boolean canExport​(com.atlassian.user.User user,
                                 com.atlassian.user.Group target)
        Unsupported.
        Specified by:
        canExport in interface PermissionDelegate<com.atlassian.user.Group>
      • canSetPermissions

        public boolean canSetPermissions​(com.atlassian.user.User user,
                                         com.atlassian.user.Group target)
        Determines if the specified user can assign new permissions to or remove existing permissions from the target group. Only system administrators can set permissions on groups with system administrators permissions (or the confluence-administrator super group).
        Specified by:
        canSetPermissions in interface PermissionDelegate<com.atlassian.user.Group>
        Returns:
        true if the specified user can set permissions on the target group, false otherwise.
      • canAdminister

        public boolean canAdminister​(com.atlassian.user.User user,
                                     com.atlassian.user.Group target)
        Unsupported.
        Specified by:
        canAdminister in interface PermissionDelegate<com.atlassian.user.Group>
      • setSpacePermissionManager

        public void setSpacePermissionManager​(SpacePermissionManager spacePermissionManager)