|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.jira.security.DefaultGlobalPermissionManager
public class DefaultGlobalPermissionManager
| Constructor Summary | |
|---|---|
DefaultGlobalPermissionManager(com.atlassian.event.api.EventPublisher eventPublisher,
com.atlassian.crowd.embedded.api.CrowdService crowdService)
|
|
| Method Summary | |
|---|---|
boolean |
addPermission(int permissionId,
String group)
Adds a global permission |
Collection<String> |
getGroupNames(int permissionId)
Retrieve all the group names with this permission. |
Collection<com.atlassian.crowd.embedded.api.Group> |
getGroupsWithPermission(int permissionId)
Retrieve all the groups with this permission. |
Collection<JiraPermission> |
getPermissions(int permissionType)
Retrieve a list of user groups which have been granted a specified permission. |
boolean |
hasPermission(int permissionId)
Check if a global anonymous permission exists |
boolean |
hasPermission(int permissionId,
com.atlassian.crowd.embedded.api.User u)
Check if a global permission for one of the users groups exists |
protected boolean |
hasPermission(JiraPermission jiraPermission)
|
void |
onClearCache(ClearCacheEvent event)
|
boolean |
removePermission(int permissionId,
String group)
Removes a global permission |
boolean |
removePermissions(String group)
Remove a global permissions that the group passed in |
void |
start()
This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultGlobalPermissionManager(com.atlassian.event.api.EventPublisher eventPublisher,
com.atlassian.crowd.embedded.api.CrowdService crowdService)
| Method Detail |
|---|
public void start()
throws Exception
Startable
start in interface StartableException - Allows implementations to throw an Exception.@EventListener public void onClearCache(ClearCacheEvent event)
public boolean addPermission(int permissionId,
String group)
throws CreateException
addPermission in interface GlobalPermissionManagerpermissionId - must be a global permission typegroup - can be null if it is anyone permission
CreateExceptionpublic Collection<JiraPermission> getPermissions(int permissionType)
GlobalPermissionManagerJiraPermission contains a reference to the user group.
JiraPermission.getScheme() is always NULL, because Global permission are not configured using schemes.
JiraPermission.getType() will always return "group", because global permissions can only be granted to groups.
getPermissions in interface GlobalPermissionManagerpermissionType - The permission. Must be a global permission.
JiraPermission.getPermType(), must never return null.
public boolean removePermission(int permissionId,
String group)
throws RemoveException
removePermission in interface GlobalPermissionManagerpermissionId - must be a global permission typegroup - can be null if it is anyone permission
RemoveException
public boolean removePermissions(String group)
throws RemoveException
removePermissions in interface GlobalPermissionManagergroup - must NOT be null and the group must exist
RemoveException - if the permission removal failspublic boolean hasPermission(int permissionId)
hasPermission in interface GlobalPermissionManagerpermissionId - must be global permission
GlobalPermissionManager.hasPermission(int, User)
public boolean hasPermission(int permissionId,
com.atlassian.crowd.embedded.api.User u)
hasPermission in interface GlobalPermissionManagerpermissionId - must be a global permissionu - must not be null
GlobalPermissionManager.hasPermission(int),
PermissionManager.hasPermission(int, User)public Collection<com.atlassian.crowd.embedded.api.Group> getGroupsWithPermission(int permissionId)
GlobalPermissionManager
getGroupsWithPermission in interface GlobalPermissionManagerpermissionId - must be a global permission
Group's, will never be null.public Collection<String> getGroupNames(int permissionId)
GlobalPermissionManager
getGroupNames in interface GlobalPermissionManagerpermissionId - must be a global permission
protected boolean hasPermission(JiraPermission jiraPermission)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||