|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.security.acegi.acls.BambooAclUpdateHelper
public class BambooAclUpdateHelper
A helper class used in Acl update and creation operations
It converts between Acl
and AccessControlEntry
objects and a "permissionKey"
which is a String
representation of a Acl
and AccessControlEntry
combination.
The "permissionKeys" are in the format: bambooPermission_TYPE_PRINCIPAL_PERMISSION
The permission configuration UI understands this format.
Field Summary | |
---|---|
static java.lang.String |
BAMBOO_PERMISSION_FORM_GROUP
|
static java.lang.String |
BAMBOO_PERMISSION_FORM_GROUP_PREFIX
|
static java.lang.String |
BAMBOO_PERMISSION_FORM_ROLE
|
static java.lang.String |
BAMBOO_PERMISSION_FORM_ROLE_PREFIX
|
static java.lang.String |
BAMBOO_PERMISSION_FORM_SEPARATOR
|
static java.lang.String |
BAMBOO_PERMISSION_FORM_USER
|
static java.lang.String |
BAMBOO_PERMISSION_FORM_USER_PREFIX
|
static java.lang.String |
BAMBOO_PERMISSION_PREFIX
|
Constructor Summary | |
---|---|
BambooAclUpdateHelper()
|
Method Summary | |
---|---|
void |
buildPermissionAndUserGroupListsFromAcl(java.util.List grantedPermissions,
java.util.List grantedUsers,
java.util.List grantedGroups,
org.acegisecurity.acls.Acl acl)
Helper conversion method for the permission configuration pages. |
java.util.List |
buildPermissionListFromRequest(java.util.Map param)
Builds a list of permissionKeys from the request Map |
void |
buildUserGroupListsFromPermissions(java.util.List grantedPermissions,
java.util.List grantedUsers,
java.util.List grantedGroups)
Given a list of granted permissions (permissionKey String s), it will populate the grantedUsers list with
unique usernames of those users which have permissions. |
org.acegisecurity.acls.MutableAcl |
createNewDefaultAcl(com.atlassian.user.User user)
Creates a default Acl which has: - All permissions for the creator (user argument) of the plan - READ permission for all logged in users - READ permission for all anonymous users |
java.lang.String |
getPermissionKeyFromAce(org.acegisecurity.acls.AccessControlEntry ace)
Given an AccessControlEntry return a String representation. |
void |
modifyAclAces(org.acegisecurity.acls.MutableAcl acl,
java.util.List newPermissionKeys)
Updates an MutableAcl with new AccessControlEntry s with permissions
represented by a list of String permissionKeys. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String BAMBOO_PERMISSION_FORM_SEPARATOR
public static final java.lang.String BAMBOO_PERMISSION_FORM_USER
public static final java.lang.String BAMBOO_PERMISSION_FORM_GROUP
public static final java.lang.String BAMBOO_PERMISSION_FORM_ROLE
public static java.lang.String BAMBOO_PERMISSION_PREFIX
public static final java.lang.String BAMBOO_PERMISSION_FORM_USER_PREFIX
public static final java.lang.String BAMBOO_PERMISSION_FORM_GROUP_PREFIX
public static final java.lang.String BAMBOO_PERMISSION_FORM_ROLE_PREFIX
Constructor Detail |
---|
public BambooAclUpdateHelper()
Method Detail |
---|
public java.util.List buildPermissionListFromRequest(java.util.Map param)
Map
param
-
List
of String
s representing permissions in the request mappublic void buildUserGroupListsFromPermissions(java.util.List grantedPermissions, java.util.List grantedUsers, java.util.List grantedGroups)
String
s), it will populate the grantedUsers list with
unique usernames of those users which have permissions. Likewise, it will populate the grantedGroups list with
unique group names of those groups which have permssions.
grantedPermissions
- grantedUsers
- grantedGroups
- public void buildPermissionAndUserGroupListsFromAcl(java.util.List grantedPermissions, java.util.List grantedUsers, java.util.List grantedGroups, org.acegisecurity.acls.Acl acl)
Acl
and populates three lists from this Acl:
- grantedPermissions - a list of String
in format: bambooPermission_TYPE_PRINCIPAL_PERMISSION
- grantedUsers - a list of String
usernames - who have at least one AccessControlEntry
against the Acl
- grantedGroups - a list of String
groupnames - who have at least one AccessControlEntry
against the Acl
grantedPermissions
- grantedUsers
- grantedGroups
- acl
- public void modifyAclAces(org.acegisecurity.acls.MutableAcl acl, java.util.List newPermissionKeys)
MutableAcl
with new AccessControlEntry
s with permissions
represented by a list of String
permissionKeys.
acl
- newPermissionKeys
- public java.lang.String getPermissionKeyFromAce(org.acegisecurity.acls.AccessControlEntry ace)
AccessControlEntry
return a String
representation.
ace
-
public org.acegisecurity.acls.MutableAcl createNewDefaultAcl(com.atlassian.user.User user)
MutableAcl
representing a default permission set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |