|
||||||||||
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,
String group,
String securityType)
Not implemented. |
Collection |
getAllGroups(int permType,
org.ofbiz.core.entity.GenericValue entity)
Not implemented. |
Collection |
getProjects(int permType,
User user)
Simply returns all projects. |
Collection |
getProjects(int permissionId,
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,
User u)
Always returns true. |
boolean |
hasPermission(int permissionsId,
org.ofbiz.core.entity.GenericValue project,
User u,
boolean issueCreation)
Always return true. |
boolean |
hasPermission(int permissionsId,
Issue issue,
User u)
Always returns true. |
boolean |
hasPermission(int permissionsId,
Project project,
User user)
Always return true. |
boolean |
hasPermission(int permissionsId,
Project project,
User user,
boolean issueCreation)
Always return true. |
boolean |
hasPermission(int permissionType,
User u)
Always returns true. |
boolean |
hasProjects(int permissionId,
User user)
Returns true if there are any projects at all. |
void |
removeGroupPermissions(String group)
Not implemented. |
void |
removeUserPermissions(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, String group, 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 Collection getProjects(int permType, User user)
getProjects
in interface PermissionManager
permType
- unused.user
- unused.
public Collection getProjects(int permissionId, 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, User user)
hasProjects
in interface PermissionManager
permissionId
- ignored.user
- ignored.
public void removeGroupPermissions(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(String group)
removeUserPermissions
in interface PermissionManager
group
- username of the user whose permissions are to be removedpublic Collection getAllGroups(int permType, org.ofbiz.core.entity.GenericValue entity) throws Exception
getAllGroups
in interface PermissionManager
permType
- permission identity
- project to retireve groups from
Exception
public boolean hasPermission(int permissionType, 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, User u)
hasPermission
in interface PermissionManager
permissionsId
- ignoredentity
- ignoredu
- ignored
public boolean hasPermission(int permissionsId, Issue issue, User u)
hasPermission
in interface PermissionManager
permissionsId
- ignoredissue
- ignoredu
- ignored
public boolean hasPermission(int permissionsId, Project project, User user)
hasPermission
in interface PermissionManager
permissionsId
- ignoredproject
- ignoreduser
- ignored
public boolean hasPermission(int permissionsId, Project project, User user, boolean issueCreation)
hasPermission
in interface PermissionManager
permissionsId
- ignoredproject
- ignoreduser
- ignoredissueCreation
- ignored
public boolean hasPermission(int permissionsId, org.ofbiz.core.entity.GenericValue project, 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 |