@Transactional public class GroupAdministrationPermissionServiceImpl extends Object implements GroupAdministrationPermissionService
Constructor and Description |
---|
GroupAdministrationPermissionServiceImpl(ApplicationDAO applicationDAO,
UserAdministrationGrantGroupDao userGrantDao,
GroupAdministrationGrantGroupDao groupGrantDao,
InternalGroupDao internalGroupDao,
InternalUserDao internalUserDao,
DirectoryManager directoryManager,
AuthenticatedUserProvider authenticatedUserProvider,
DcLicenseChecker dcLicenseChecker) |
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) |
void |
setUserPermissionService(UserPermissionService userPermissionService) |
public GroupAdministrationPermissionServiceImpl(ApplicationDAO applicationDAO, UserAdministrationGrantGroupDao userGrantDao, GroupAdministrationGrantGroupDao groupGrantDao, InternalGroupDao internalGroupDao, InternalUserDao internalUserDao, DirectoryManager directoryManager, AuthenticatedUserProvider authenticatedUserProvider, DcLicenseChecker dcLicenseChecker)
public List<UserGroupAdministrationMapping> getAdministeredGroupsForCurrentUser(@Nonnull AdministeredGroupsQuery query) throws OperationFailedException, FeatureInaccessibleException
GroupAdministrationPermissionService
getAdministeredGroupsForCurrentUser
in interface GroupAdministrationPermissionService
query
- the criteria that the returned groups must meet or null for all groupsOperationFailedException
FeatureInaccessibleException
public List<UserGroupAdministrationMapping> getAdministeredGroups(User user, @Nonnull AdministeredGroupsQuery query) throws OperationFailedException, FeatureInaccessibleException
GroupAdministrationPermissionService
getAdministeredGroups
in interface GroupAdministrationPermissionService
user
- the userquery
- the criteria that the returned groups must meet or null for all groupsOperationFailedException
FeatureInaccessibleException
public boolean isUserGroupLevelAdmin(User user) throws OperationFailedException
isUserGroupLevelAdmin
in interface GroupAdministrationPermissionService
user
- the userOperationFailedException
public boolean isCurrentUserAdminOfGroup(Group group) throws GroupNotFoundException, DirectoryNotFoundException, OperationFailedException, FeatureInaccessibleException
GroupAdministrationPermissionService
isCurrentUserAdminOfGroup
in interface GroupAdministrationPermissionService
group
- the grouptrue
if the user is an administrator of the group, false
otherwiseGroupNotFoundException
DirectoryNotFoundException
OperationFailedException
FeatureInaccessibleException
public boolean isUserAdminOfGroup(User user, Group group) throws GroupNotFoundException, DirectoryNotFoundException, OperationFailedException, FeatureInaccessibleException
GroupAdministrationPermissionService
isUserAdminOfGroup
in interface GroupAdministrationPermissionService
user
- the usergroup
- the grouptrue
if the user is an administrator of the group, false
otherwiseGroupNotFoundException
DirectoryNotFoundException
OperationFailedException
FeatureInaccessibleException
public void setUserPermissionService(UserPermissionService userPermissionService)
public Set<User> getDirectGroupLevelAdminUsers(boolean considerOnlyTargetGroupsWithApplications)
getDirectGroupLevelAdminUsers
in interface GroupAdministrationPermissionService
considerOnlyTargetGroupsWithApplications
- whether only groups with mapped application should be taken into accountpublic Set<Group> getDirectGroupLevelAdminGroups(boolean considerOnlyTargetGroupsWithApplications)
getDirectGroupLevelAdminGroups
in interface GroupAdministrationPermissionService
considerOnlyTargetGroupsWithApplications
- whether only groups with mapped application should be taken into accountCopyright © 2024 Atlassian. All rights reserved.