|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.security.SubvertedPermissionManager
public class SubvertedPermissionManager
The purpose of this class is to provide a temporary access-all-areas pass and is a (partial) implementation of PermissionManager (subverting the stored permissions). Operations that attempt to specify a change to stored permissions like adding or removing permissions and the getAllGroups() method throw an UnsupportedOperationException.
Constructor Summary | |
---|---|
SubvertedPermissionManager()
|
Method Summary | |
---|---|
void |
addPermission(int permissionsId,
org.ofbiz.core.entity.GenericValue scheme,
java.lang.String group,
java.lang.String securityType)
Not implemented. |
java.util.Collection |
getAllGroups(int permType,
org.ofbiz.core.entity.GenericValue entity)
Not implemented. |
java.util.Collection<Project> |
getProjectObjects(int permissionId,
com.opensymphony.user.User user)
Retrieve a list of project objects this user has the permission for |
java.util.Collection |
getProjects(int permType,
com.opensymphony.user.User user)
Simply returns all projects. |
java.util.Collection |
getProjects(int permissionId,
com.opensymphony.user.User user,
org.ofbiz.core.entity.GenericValue category)
Returns all the projects in the given category, or if category is null, all projects in no category. |
boolean |
hasPermission(int permissionsId,
org.ofbiz.core.entity.GenericValue entity,
com.opensymphony.user.User u)
Always returns true. |
boolean |
hasPermission(int permissionsId,
org.ofbiz.core.entity.GenericValue project,
com.opensymphony.user.User u,
boolean issueCreation)
Always return true. |
boolean |
hasPermission(int permissionsId,
Issue issue,
com.opensymphony.user.User u)
Always returns true. |
boolean |
hasPermission(int permissionsId,
Project project,
com.opensymphony.user.User user)
Always return true. |
boolean |
hasPermission(int permissionsId,
Project project,
com.opensymphony.user.User user,
boolean issueCreation)
Always return true. |
boolean |
hasPermission(int permissionType,
com.opensymphony.user.User u)
Always returns true. |
boolean |
hasProjects(int permissionId,
com.opensymphony.user.User user)
Returns true if there are any projects at all. |
void |
removeGroupPermissions(java.lang.String group)
Not implemented. |
void |
removeUserPermissions(java.lang.String group)
Not implemented. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SubvertedPermissionManager()
Method Detail |
---|
public void addPermission(int permissionsId, org.ofbiz.core.entity.GenericValue scheme, java.lang.String group, java.lang.String securityType)
addPermission
in interface PermissionManager
permissionsId
- Permissions value. E.g. See Permissions.ADMINISTER
scheme
- If null permission is global otherwise it is added to the schemegroup
- Used for e.g. group namesecurityType
- e.g. GroupDropdown.DESCpublic java.util.Collection getProjects(int permType, com.opensymphony.user.User user)
getProjects
in interface PermissionManager
permType
- unused.user
- unused.
public java.util.Collection<Project> getProjectObjects(int permissionId, com.opensymphony.user.User user)
PermissionManager
getProjectObjects
in interface PermissionManager
permissionId
- must NOT be a global permissionuser
- user
Project
objectspublic java.util.Collection getProjects(int permissionId, com.opensymphony.user.User user, org.ofbiz.core.entity.GenericValue category)
getProjects
in interface PermissionManager
permissionId
- ignored.user
- ignored.category
- the category for which to get projects.
public boolean hasProjects(int permissionId, com.opensymphony.user.User user)
hasProjects
in interface PermissionManager
permissionId
- ignored.user
- ignored.
public void removeGroupPermissions(java.lang.String group)
removeGroupPermissions
in interface PermissionManager
group
- The name of the group that needs to be removed, must NOT be null and must be a real grouppublic void removeUserPermissions(java.lang.String group)
removeUserPermissions
in interface PermissionManager
group
- username of the user whose permissions are to be removedpublic java.util.Collection getAllGroups(int permType, org.ofbiz.core.entity.GenericValue entity) throws java.lang.Exception
getAllGroups
in interface PermissionManager
permType
- permission identity
- project to retireve groups from
java.lang.Exception
public boolean hasPermission(int permissionType, com.opensymphony.user.User u)
hasPermission
in interface PermissionManager
permissionType
- ignoredu
- ignored
GlobalPermissionManager.hasPermission(int, com.opensymphony.user.User)
public boolean hasPermission(int permissionsId, org.ofbiz.core.entity.GenericValue entity, com.opensymphony.user.User u)
hasPermission
in interface PermissionManager
permissionsId
- ignoredentity
- ignoredu
- ignored
public boolean hasPermission(int permissionsId, Issue issue, com.opensymphony.user.User u)
hasPermission
in interface PermissionManager
permissionsId
- ignoredissue
- ignoredu
- ignored
public boolean hasPermission(int permissionsId, Project project, com.opensymphony.user.User user)
hasPermission
in interface PermissionManager
permissionsId
- ignoredproject
- ignoreduser
- ignored
public boolean hasPermission(int permissionsId, Project project, com.opensymphony.user.User user, boolean issueCreation)
hasPermission
in interface PermissionManager
permissionsId
- ignoredproject
- ignoreduser
- ignoredissueCreation
- ignored
public boolean hasPermission(int permissionsId, org.ofbiz.core.entity.GenericValue project, com.opensymphony.user.User u, boolean issueCreation)
hasPermission
in interface PermissionManager
permissionsId
- ignoredproject
- ignoredu
- ignoredissueCreation
- ignored
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |