|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.util.GlobalPermissionGroupAssociationUtil
public class GlobalPermissionGroupAssociationUtil
This is a utility class to find out information about Permissions.ADMINISTER
and
Permissions.SYSTEM_ADMIN
global permission information. You can use this class to find out
if you are removing all the groups that grant a provided user the permission. You can also use
this to find out the groups that the provided user is a member of and which is associated with
the global permission.
Field Summary | |
---|---|
static org.apache.commons.collections.Transformer |
GROUP_TO_GROUPNAME
Transforms a Group to its name as a String. |
Constructor Summary | |
---|---|
GlobalPermissionGroupAssociationUtil(GlobalPermissionManager globalPermissionManager)
|
Method Summary | |
---|---|
java.util.Collection |
getAdminMemberGroups(com.opensymphony.user.User user)
Returns All the groupNames that have global "Administration" permission that this user is a member of. |
java.util.List |
getGroupNamesModifiableByCurrentUser(com.opensymphony.user.User currentUser,
java.util.List groupNames)
Determines which groups will be visible to the current user. |
java.util.List |
getGroupsModifiableByCurrentUser(com.opensymphony.user.User currentUser,
java.util.List groups)
Determines which groups will be visible to the current user. |
java.util.Collection |
getSysAdminMemberGroups(com.opensymphony.user.User user)
Returns All the groupNames that have global "System Administration" permission that this user is a member of. |
boolean |
isRemovingAllMyAdminGroups(java.util.Collection groupsToLeave,
com.opensymphony.user.User user)
Return true if the user is trying to remove all the groups that grant them the administration permission. |
boolean |
isRemovingAllMySysAdminGroups(java.util.Collection groupsToLeave,
com.opensymphony.user.User user)
Return true if the user is trying to remove all the groups that grant them the system administration permission. |
boolean |
isUserAbleToDeleteGroup(com.opensymphony.user.User user,
java.lang.String groupName)
Determines, based on the users permissions, if the group can be deleted. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final org.apache.commons.collections.Transformer GROUP_TO_GROUPNAME
Group
to its name as a String.
Constructor Detail |
---|
public GlobalPermissionGroupAssociationUtil(GlobalPermissionManager globalPermissionManager)
Method Detail |
---|
public boolean isRemovingAllMySysAdminGroups(java.util.Collection groupsToLeave, com.opensymphony.user.User user)
groupsToLeave
- a Collection of String
, group names, that the user is trying to
unassociate/remove.user
- performing this operation.
public java.util.Collection getSysAdminMemberGroups(com.opensymphony.user.User user)
user
- the user performing this operation.
String
group names that the global System Admin permission is associated
with and which the user is in.public boolean isRemovingAllMyAdminGroups(java.util.Collection groupsToLeave, com.opensymphony.user.User user)
groupsToLeave
- a Collection of String
, group names, that the user is trying to
unassociate/remove.user
- performing this operation.
public java.util.Collection getAdminMemberGroups(com.opensymphony.user.User user)
user
- performing this operation.
String
group names that the global Admin permission is associated
with and which the user is in.public boolean isUserAbleToDeleteGroup(com.opensymphony.user.User user, java.lang.String groupName)
user
- performing this operation.groupName
- the group to delete
Permissions.SYSTEM_ADMIN
permission or if
the group is not associated with the Permissions.SYSTEM_ADMIN
permission.public java.util.List getGroupNamesModifiableByCurrentUser(com.opensymphony.user.User currentUser, java.util.List groupNames)
Permissions.SYSTEM_ADMIN
then they can see all the groups, otherwise they will not be able to see the group names associated with
the Permissions.SYSTEM_ADMIN
permission.
currentUser
- performing the operationgroupNames
- the full set of possible group names the user might see
Permissions.SYSTEM_ADMIN
rights, otherwise a collection that does not contain the SYS_ADMIN group names.public java.util.List getGroupsModifiableByCurrentUser(com.opensymphony.user.User currentUser, java.util.List groups)
Permissions.SYSTEM_ADMIN
then they can see all the groups, otherwise they will not be able to see the groups associated with
the Permissions.SYSTEM_ADMIN
permission.
currentUser
- performing the operationgroups
- the full set of possible groups the user might see
groups
list if they user has Permissions.SYSTEM_ADMIN
rights, otherwise a collection that does not contain the SYS_ADMIN groups.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |