@ExperimentalApi
public interface GroupAdministrationPermissionService
Modifier and Type | Method and Description |
---|---|
List<UserGroupAdministrationMapping> |
getAdministeredGroups(User user,
AdministeredGroupsQuery query)
Looks for groups a user administers
|
List<UserGroupAdministrationMapping> |
getAdministeredGroupsForCurrentUser(AdministeredGroupsQuery query)
Looks for groups that currently logged in user administers
|
Set<Group> |
getDirectGroupLevelAdminGroups(boolean considerOnlyTargetGroupsWithApplications) |
Set<User> |
getDirectGroupLevelAdminUsers(boolean considerOnlyTargetGroupsWithApplications) |
boolean |
isCurrentUserAdminOfGroup(Group group)
Check if a current logged in user is an administrator of a group
|
boolean |
isUserAdminOfGroup(User user,
Group group)
Check if a user is an administrator of a group
|
boolean |
isUserGroupLevelAdmin(User user) |
List<UserGroupAdministrationMapping> getAdministeredGroupsForCurrentUser(@Nonnull AdministeredGroupsQuery query) throws OperationFailedException, FeatureInaccessibleException
query
- the criteria that the returned groups must meet or null for all groupsIllegalStateException
- if user associated with the current session, no more exists in the directoryOperationFailedException
FeatureInaccessibleException
List<UserGroupAdministrationMapping> getAdministeredGroups(User user, @Nonnull AdministeredGroupsQuery query) throws OperationFailedException, FeatureInaccessibleException
user
- the userquery
- the criteria that the returned groups must meet or null for all groupsIllegalStateException
- if the supplied user doesn't existsOperationFailedException
FeatureInaccessibleException
boolean isUserGroupLevelAdmin(User user) throws OperationFailedException
user
- the userOperationFailedException
boolean isCurrentUserAdminOfGroup(Group group) throws GroupNotFoundException, UserNotFoundException, DirectoryNotFoundException, OperationFailedException, FeatureInaccessibleException
group
- the grouptrue
if the user is an administrator of the group, false
otherwiseGroupNotFoundException
UserNotFoundException
DirectoryNotFoundException
OperationFailedException
FeatureInaccessibleException
boolean isUserAdminOfGroup(User user, Group group) throws GroupNotFoundException, UserNotFoundException, DirectoryNotFoundException, OperationFailedException, FeatureInaccessibleException
user
- the usergroup
- the grouptrue
if the user is an administrator of the group, false
otherwiseGroupNotFoundException
UserNotFoundException
DirectoryNotFoundException
OperationFailedException
FeatureInaccessibleException
Set<User> getDirectGroupLevelAdminUsers(boolean considerOnlyTargetGroupsWithApplications)
considerOnlyTargetGroupsWithApplications
- whether only groups with mapped application should be taken into accountSet<Group> getDirectGroupLevelAdminGroups(boolean considerOnlyTargetGroupsWithApplications)
considerOnlyTargetGroupsWithApplications
- whether only groups with mapped application should be taken into accountCopyright © 2020 Atlassian. All rights reserved.