|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GlobalPermissionManager
Method Summary | |
---|---|
boolean |
addPermission(int permissionType,
String group)
Adds a global permission |
Collection<String> |
getGroupNames(int permissionId)
Retrieve all the group names with this permission. |
Collection<Group> |
getGroups(int permissionId)
Deprecated. Use getGroupsWithPermission(int) . Since 4.3 |
Collection<com.atlassian.crowd.embedded.api.Group> |
getGroupsWithPermission(int permissionId)
Retrieve all the groups with this permission. |
Collection<JiraPermission> |
getPermissions(int permissionType)
Retrieve all the global permissions of a particular type |
boolean |
hasPermission(int permissionType)
Check if a global permission is granted for an Anonymous user. |
boolean |
hasPermission(int permissionType,
com.atlassian.crowd.embedded.api.User u)
Check if a global permission for one of the users groups exists. |
boolean |
hasPermission(int permissionType,
User u)
Deprecated. Please use hasPermission(int, com.atlassian.crowd.embedded.api.User) . Since v4.3 |
boolean |
removePermission(int permissionType,
String group)
Removes a global permission |
boolean |
removePermissions(String group)
Remove a global permissions that the group passed in |
Method Detail |
---|
boolean addPermission(int permissionType, String group) throws CreateException
permissionType
- must be a global permission typegroup
- can be null if it is anyone permission
CreateException
- if the permission creation failsCollection<JiraPermission> getPermissions(int permissionType)
permissionType
- must be a global permission
JiraPermission
, must never return nullboolean removePermission(int permissionType, String group) throws RemoveException
permissionType
- must be a global permission typegroup
- can be null if it is anyone permission
RemoveException
- if the permission removal failsboolean removePermissions(String group) throws RemoveException
group
- must NOT be null and the group must exist
RemoveException
- if the permission removal failsboolean hasPermission(int permissionType)
Permissions.ADMINISTER
and the lookup is false then the same
query will be executed for the Permissions.SYSTEM_ADMIN
permission type, since
it is implied that having a Permissions.SYSTEM_ADMIN
permission grants
Permissions.ADMINISTER
rights.
Note: Use hasPermission(int, User)
method is you have the user object,
i.e. user is not anonymous.
If you are using this method directly, consider using
PermissionManager.hasPermission(int, User)
instead as it handles logged in and anonymous users as well.
permissionType
- must be global permission
hasPermission(int, User)
boolean hasPermission(int permissionType, com.atlassian.crowd.embedded.api.User u)
Permissions.ADMINISTER
and the lookup is false then the same
query will be executed for the Permissions.SYSTEM_ADMIN
permission type, since
it is implied that having a Permissions.SYSTEM_ADMIN
permission grants
Permissions.ADMINISTER
rights.
Note: Use hasPermission(int)
method is you do not have the user object, i.e. user is anonymous.
If you are using this method directly, consider using
PermissionManager.hasPermission(int, User)
instead as it handles logged in and anonymous users as well.
permissionType
- must be a global permissionu
- must not be null
hasPermission(int)
,
PermissionManager.hasPermission(int, User)
boolean hasPermission(int permissionType, User u)
hasPermission(int, com.atlassian.crowd.embedded.api.User)
. Since v4.3
Permissions.ADMINISTER
and the lookup is false then the same
query will be executed for the Permissions.SYSTEM_ADMIN
permission type, since
it is implied that having a Permissions.SYSTEM_ADMIN
permission grants
Permissions.ADMINISTER
rights.
Note: Use hasPermission(int)
method is you do not have the user object, i.e. user is anonymous.
If you are using this method directly, consider using
PermissionManager.hasPermission(int, User)
instead as it handles logged in and anonymous users as well.
permissionType
- must be a global permissionu
- must not be null
hasPermission(int)
,
PermissionManager.hasPermission(int, User)
Collection<Group> getGroups(int permissionId)
getGroupsWithPermission(int)
. Since 4.3
permissionId
- must be a global permission
Group
's, will never be null.Collection<com.atlassian.crowd.embedded.api.Group> getGroupsWithPermission(int permissionId)
permissionId
- must be a global permission
Group
's, will never be null.Collection<String> getGroupNames(int permissionId)
permissionId
- must be a global permission
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |