|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.jira.security.AbstractPermissionManager
public abstract class AbstractPermissionManager
An abstract PermissionManager that implements a lot of the common functionality to all PermissionManagers.
DefaultPermissionManager| Constructor Summary | |
|---|---|
AbstractPermissionManager()
|
|
| Method Summary | |
|---|---|
void |
addPermission(int permissionsId,
org.ofbiz.core.entity.GenericValue scheme,
String parameter,
String securityType)
Adds a permission to the system |
Collection<Group> |
getAllGroups(int permissionId,
org.ofbiz.core.entity.GenericValue project)
Retrieve all groups that are used in the permission globally and in the project entity |
Collection<com.atlassian.crowd.embedded.api.Group> |
getAllGroups(int permissionId,
Project project)
Retrieve all groups that are used in the permission globally and in the project. |
protected PermissionSchemeManager |
getPermissionSchemeManager()
|
protected ProjectManager |
getProjectManager()
|
Collection<Project> |
getProjectObjects(int permissionId,
com.atlassian.crowd.embedded.api.User user)
Retrieve a list of project objects this user has the permission for |
Collection<Project> |
getProjectObjects(int permissionId,
User user)
Retrieve a list of project objects this user has the permission for |
Collection<org.ofbiz.core.entity.GenericValue> |
getProjects(int permissionId,
com.atlassian.crowd.embedded.api.User user)
Retrieve a list of projects this user has the permission for |
Collection<org.ofbiz.core.entity.GenericValue> |
getProjects(int permissionId,
User user)
Retrieve a list of projects this user has the permission for |
Collection<org.ofbiz.core.entity.GenericValue> |
getProjects(int permissionId,
com.atlassian.crowd.embedded.api.User user,
org.ofbiz.core.entity.GenericValue category)
Retrieve a list of projects associated with the specified category, that this user has the permissions for |
Collection<org.ofbiz.core.entity.GenericValue> |
getProjects(int permissionId,
User user,
org.ofbiz.core.entity.GenericValue category)
Retrieve a list of projects associated with the specified category, that this user has the permissions for |
boolean |
hasPermission(int permissionsId,
org.ofbiz.core.entity.GenericValue projectOrIssue,
com.atlassian.crowd.embedded.api.User u)
Checks to see if this has permission to see the specified entity Check Permissions scheme(s) if the entity is project Check Permissions scheme(s) and issue level security scheme(s) if the entity is an issue |
boolean |
hasPermission(int permissionsId,
org.ofbiz.core.entity.GenericValue entity,
User u)
Checks to see if this has permission to see the specified entity. |
boolean |
hasPermission(int permissionsId,
org.ofbiz.core.entity.GenericValue entity,
com.atlassian.crowd.embedded.api.User u,
boolean issueCreation)
Does the same as PermissionManager.hasPermission(int,org.ofbiz.core.entity.GenericValue,User) except
the entity is a project GenericValue. |
boolean |
hasPermission(int permissionsId,
org.ofbiz.core.entity.GenericValue project,
User u,
boolean issueCreation)
Does the same as PermissionManager.hasPermission(int,org.ofbiz.core.entity.GenericValue,User) except
the entity is a project GenericValue. |
boolean |
hasPermission(int permissionsId,
Issue issue,
com.atlassian.crowd.embedded.api.User u)
Does the same as PermissionManager.hasPermission(int,org.ofbiz.core.entity.GenericValue,User) except
the entity is an issue. |
boolean |
hasPermission(int permissionsId,
Issue entity,
User u)
Does the same as PermissionManager.hasPermission(int,org.ofbiz.core.entity.GenericValue,User) except
the entity is an issue. |
boolean |
hasPermission(int permissionsId,
Project project,
com.atlassian.crowd.embedded.api.User user)
Checks whether the specified user has a specified permission within the context of a specified project. |
boolean |
hasPermission(int permissionsId,
Project project,
User user)
Checks whether the specified user has a specified permission within the context of a specified project. |
boolean |
hasPermission(int permissionsId,
Project project,
com.atlassian.crowd.embedded.api.User user,
boolean issueCreation)
Checks whether the specified user has a specified permission within the context of a specified project. |
boolean |
hasPermission(int permissionsId,
Project project,
User user,
boolean issueCreation)
Checks whether the specified user has a specified permission within the context of a specified project. |
boolean |
hasPermission(int permissionsId,
com.atlassian.crowd.embedded.api.User user)
Checks to see if this user has the specified permission It will check only global permissions as there are no other permissions to check |
boolean |
hasPermission(int permissionsId,
User user)
Checks to see if this user has the specified permission. |
protected boolean |
hasProjectPermission(Long permissionTypeLong,
org.ofbiz.core.entity.GenericValue entity,
com.atlassian.crowd.embedded.api.User user,
boolean issueCreation)
Return true if the supplied user has the specified permission in the context of the supplied entity |
boolean |
hasProjects(int permissionId,
com.atlassian.crowd.embedded.api.User user)
Can this user see at least one project with this permission |
boolean |
hasProjects(int permissionId,
User user)
Can this user see at least one project with this permission |
protected boolean |
isGlobalPermission(int permissionId)
|
void |
removeGroupPermissions(String group)
Remove all permissions that have used this group |
void |
removeUserPermissions(String username)
Remove all permissions that have used this username |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractPermissionManager()
| Method Detail |
|---|
public void addPermission(int permissionsId,
org.ofbiz.core.entity.GenericValue scheme,
String parameter,
String securityType)
throws CreateException
addPermission in interface PermissionManagerpermissionsId - Permissions valuescheme - If null permission is global otherwise it is added to the schemeparameter - Used for e.g. group namesecurityType - e.g. GroupDropdown.DESC
CreateException
public boolean hasPermission(int permissionsId,
com.atlassian.crowd.embedded.api.User user)
hasPermission in interface PermissionManagerpermissionsId - permission iduser - user
GlobalPermissionManager.hasPermission(int, User)
public boolean hasPermission(int permissionsId,
org.ofbiz.core.entity.GenericValue projectOrIssue,
com.atlassian.crowd.embedded.api.User u)
hasPermission in interface PermissionManagerpermissionsId - , not a global permissionprojectOrIssue - not null must be Project or Issueu - User object, possibly null if JIRA is accessed anonymously
public boolean hasPermission(int permissionsId,
Issue issue,
com.atlassian.crowd.embedded.api.User u)
PermissionManagerPermissionManager.hasPermission(int,org.ofbiz.core.entity.GenericValue,User) except
the entity is an issue.
Note that if the issue's generic value is null, it is assumed that the issue is currently being created, and so
the permission check call is deferred to the issue's project object, with the issueCreation flag set to true. See
JRA-14788 for more info.
hasPermission in interface PermissionManagerpermissionsId - Not a global permissionissue - Not null.u - User object, possibly null if JIRA is accessed anonymously
public boolean hasPermission(int permissionsId,
Project project,
com.atlassian.crowd.embedded.api.User user)
PermissionManager
hasPermission in interface PermissionManagerpermissionsId - A non-global permission, i.e. a permission that is granted via a project contextproject - The project that is the context of the permission check.user - The person to perform the permission check for
public boolean hasPermission(int permissionsId,
Project project,
com.atlassian.crowd.embedded.api.User user,
boolean issueCreation)
PermissionManager
hasPermission in interface PermissionManagerpermissionsId - A non-global permission, i.e. a permission that is granted via a project contextproject - The project that is the context of the permission check.user - The person to perform the permission check forissueCreation - Whether this permission is being checked during issue creation
public boolean hasPermission(int permissionsId,
org.ofbiz.core.entity.GenericValue entity,
com.atlassian.crowd.embedded.api.User u,
boolean issueCreation)
PermissionManagerPermissionManager.hasPermission(int,org.ofbiz.core.entity.GenericValue,User) except
the entity is a project GenericValue.
hasPermission in interface PermissionManagerpermissionsId - Not a global permissionentity - Not null.u - User object, possibly null if JIRA is accessed anonymouslyissueCreation - Whether this permission is being checked during issue creation
protected boolean hasProjectPermission(Long permissionTypeLong,
org.ofbiz.core.entity.GenericValue entity,
com.atlassian.crowd.embedded.api.User user,
boolean issueCreation)
permissionTypeLong - A non-global permission, i.e. a permission that is granted via a contextentity - The entity that is the context of the permission check.user - The person to perform the permission check forissueCreation - Whether this permission is being checked during issue creation (passed through the
PermissionSchemeManager to SchemeType.hasPermission(
org.ofbiz.core.entity.GenericValue, String, User, boolean))
protected PermissionSchemeManager getPermissionSchemeManager()
public void removeGroupPermissions(String group)
throws RemoveException
removeGroupPermissions in interface PermissionManagergroup - The name of the group that needs to be removed, must NOT be null and must be a real group
RemoveException
public void removeUserPermissions(String username)
throws RemoveException
PermissionManager
removeUserPermissions in interface PermissionManagerusername - username of the user whose permissions are to be removed
RemoveException - if permission removal fails
public boolean hasProjects(int permissionId,
com.atlassian.crowd.embedded.api.User user)
hasProjects in interface PermissionManagerpermissionId - must NOT be a global permissionuser - user
Exceptionprotected ProjectManager getProjectManager()
public Collection<Project> getProjectObjects(int permissionId,
com.atlassian.crowd.embedded.api.User user)
PermissionManager
getProjectObjects in interface PermissionManagerpermissionId - must NOT be a global permissionuser - user
Project objects
public Collection<org.ofbiz.core.entity.GenericValue> getProjects(int permissionId,
com.atlassian.crowd.embedded.api.User user,
org.ofbiz.core.entity.GenericValue category)
PermissionManager
getProjects in interface PermissionManagerpermissionId - permission iduser - usercategory - GenericValue representing category
GenericValue objectsprotected boolean isGlobalPermission(int permissionId)
public Collection<com.atlassian.crowd.embedded.api.Group> getAllGroups(int permissionId,
Project project)
PermissionManager
getAllGroups in interface PermissionManagerpermissionId - permission idproject - project from which to retrieve groups
public Collection<Group> getAllGroups(int permissionId,
org.ofbiz.core.entity.GenericValue project)
getAllGroups in interface PermissionManagerpermissionId - permission idproject - project to retireve groups from
public final boolean hasPermission(int permissionsId,
User user)
PermissionManager
hasPermission in interface PermissionManagerpermissionsId - permission iduser - user, can be null - anonymous user
GlobalPermissionManager.hasPermission(int, User)
public final boolean hasPermission(int permissionsId,
org.ofbiz.core.entity.GenericValue entity,
User u)
PermissionManager
hasPermission in interface PermissionManagerpermissionsId - Not a global permissionentity - Not null. Must be either an issue or project.u - User object, possibly null if JIRA is accessed anonymously
public final boolean hasPermission(int permissionsId,
Issue entity,
User u)
PermissionManagerPermissionManager.hasPermission(int,org.ofbiz.core.entity.GenericValue,User) except
the entity is an issue.
Note that if the issue's generic value is null, it is assumed that the issue is currently being created, and so
the permission check call is deferred to the issue's project object, with the issueCreation flag set to true. See
JRA-14788 for more info.
hasPermission in interface PermissionManagerpermissionsId - Not a global permissionentity - Not null.u - User object, possibly null if JIRA is accessed anonymously
public final boolean hasPermission(int permissionsId,
Project project,
User user)
PermissionManager
hasPermission in interface PermissionManagerpermissionsId - A non-global permission, i.e. a permission that is granted via a project contextproject - The project that is the context of the permission check.user - The person to perform the permission check for
public final boolean hasPermission(int permissionsId,
Project project,
User user,
boolean issueCreation)
PermissionManager
hasPermission in interface PermissionManagerpermissionsId - A non-global permission, i.e. a permission that is granted via a project contextproject - The project that is the context of the permission check.user - The person to perform the permission check forissueCreation - Whether this permission is being checked during issue creation
public final boolean hasPermission(int permissionsId,
org.ofbiz.core.entity.GenericValue project,
User u,
boolean issueCreation)
PermissionManagerPermissionManager.hasPermission(int,org.ofbiz.core.entity.GenericValue,User) except
the entity is a project GenericValue.
hasPermission in interface PermissionManagerpermissionsId - Not a global permissionproject - Not null.u - User object, possibly null if JIRA is accessed anonymouslyissueCreation - Whether this permission is being checked during issue creation
public final boolean hasProjects(int permissionId,
User user)
PermissionManager
hasProjects in interface PermissionManagerpermissionId - must NOT be a global permissionuser - user being checked
public Collection<org.ofbiz.core.entity.GenericValue> getProjects(int permissionId,
com.atlassian.crowd.embedded.api.User user)
PermissionManager
getProjects in interface PermissionManagerpermissionId - must NOT be a global permissionuser - user
GenericValue objects
public Collection<org.ofbiz.core.entity.GenericValue> getProjects(int permissionId,
User user)
PermissionManager
getProjects in interface PermissionManagerpermissionId - must NOT be a global permissionuser - user
GenericValue objects
public final Collection<Project> getProjectObjects(int permissionId,
User user)
PermissionManager
getProjectObjects in interface PermissionManagerpermissionId - must NOT be a global permissionuser - user
Project objects
public final Collection<org.ofbiz.core.entity.GenericValue> getProjects(int permissionId,
User user,
org.ofbiz.core.entity.GenericValue category)
PermissionManager
getProjects in interface PermissionManagerpermissionId - permission iduser - usercategory - GenericValue representing category
GenericValue objects
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||