Class AbstractPermissionAction
- java.lang.Object
-
- com.opensymphony.xwork2.ActionSupport
-
- com.atlassian.bamboo.ww2.BambooActionSupport
-
- com.atlassian.bamboo.configuration.AbstractPermissionAction
-
- All Implemented Interfaces:
JsonStreamingAction
,ErrorCollection
,BambooSessionAware
,NavigationAware
,DomainObjectSecurityAware
,GlobalReadSecurityAware
,ReturnUrlAware
,com.atlassian.core.i18n.I18nTextProvider
,com.atlassian.struts.TextProvider
,com.atlassian.struts.ValidationAware
,com.opensymphony.xwork.ValidationAware
,com.opensymphony.xwork2.Action
,com.opensymphony.xwork2.interceptor.ValidationAware
,com.opensymphony.xwork2.LocaleProvider
,com.opensymphony.xwork2.TextProvider
,com.opensymphony.xwork2.Validateable
,Serializable
- Direct Known Subclasses:
BulkEditBuildPermissions
public abstract class AbstractPermissionAction extends BambooActionSupport
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.atlassian.bamboo.ww2.BambooActionSupport
BambooActionSupport.JSONStatus
-
-
Field Summary
Fields Modifier and Type Field Description protected org.acegisecurity.acls.MutableAcl
acl
protected HibernateMutableAclService
aclService
protected BambooAclUpdateHelper
aclUpdateHelper
protected String
addGroupPrincipal
protected String
addUserPrincipal
protected long
entityId
protected List<String>
grantedGroups
protected List<String>
grantedPermissions
protected List<String>
grantedUsers
protected String
newGroup
protected String
newUser
protected List<String>
nonProcessedGrantedPermissions
protected String
principalType
protected com.atlassian.user.UserManager
userManager
-
Fields inherited from class com.atlassian.bamboo.ww2.BambooActionSupport
ACCESS_DENIED, administrationConfigurationAccessor, administrationConfigurationManager, administrationConfigurationPersister, AGGREGATE_URL_PATTERN, authenticationContext, bambooPermissionManager, bambooUserManager, BUILD_KEY_CONTEXT, buildDefinitionManager, cachedPlanManager, CONFIRM, cookieCutter, deploymentProjectService, featureManager, PAGE_NOT_FOUND, PLAN_KEY_CONTEXT, planExecutionManager, planManager, pluginAccessor, projectManager, webInterfaceManager
-
-
Constructor Summary
Constructors Constructor Description AbstractPermissionAction()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
bulkUpdateAcls(org.acegisecurity.acls.MutableAcl acl, List<String> permissions)
String
doInputPrincipal()
abstract @Nullable org.acegisecurity.acls.MutableAcl
getAcl()
String
getAddGroupPrincipal()
String
getAddUserPrincipal()
abstract @NotNull Map<String,String>
getEditablePermissions()
@NotNull Class<?>
getEntityAclType()
long
getEntityId()
abstract @NotNull String
getEntityName()
abstract @NotNull Class<?>
getEntityType()
Class of the entity on which the permissions are being modified.List<String>
getGrantedGroups()
List<String>
getGrantedPermissions()
List<String>
getGrantedUsers()
@NotNull Map<String,String>
getGrantedUsersDisplayNames()
BambooPermission
getMinimalPermission()
Minimal permission to grant when adding new principal.String
getNewGroup()
String
getNewUser()
String
getPrincipalType()
boolean
hasEditPermissionForGroup(String groupName)
boolean
hasEditPermissionForUser(BambooUser user)
boolean
hasEditPermissionForUserName(String userName)
protected boolean
hasParameters()
protected void
populatePermissionLists()
protected String
saveAllPermissions()
void
setAcl(org.acegisecurity.acls.MutableAcl acl)
void
setAclService(HibernateMutableAclService aclService)
void
setAclUpdateHelper(BambooAclUpdateHelper aclUpdateHelper)
void
setAddGroupPrincipal(String addGroupPrincipal)
void
setAddUserPrincipal(String addUserPrincipal)
void
setEntityId(long entityId)
void
setGrantedGroups(List<String> grantedGroups)
void
setGrantedPermissions(List<String> grantedPermissions)
void
setGrantedUsers(List<String> grantedUsers)
void
setNewGroup(String newGroup)
void
setNewUser(String newUser)
void
setPrincipalType(String principalType)
void
setUserManager(com.atlassian.user.UserManager userManager)
boolean
showAdminPermissions()
protected void
updateAcl(org.acegisecurity.acls.MutableAcl acl)
-
Methods inherited from class com.atlassian.bamboo.ww2.BambooActionSupport
addActionError, addActionError, addActionWarning, addError, addError, addErrorCollection, addErrorMessage, addErrorMessage, addErrorMessages, addErrors, addFieldErrors, addHelpPanel, addIllegalArgumentException, areCheckBoxesEmpty, buildJsonObject, buildWebPanelContext, checkFieldXssSafety, createFieldValidator, doDefault, doesHelpLinkHaveMatchingTitle, doesLabelKeyHaveMatchingDescription, doExecute, doInput, forceRelativeReturnUrl, getActionWarnings, getAdministrationConfiguration, getAvailableCategoryJson, getBamboo, getBambooLicenseManager, getBambooPermissionManager, getBambooSession, getBambooUrl, getBambooUserManager, getBaseUrl, getBestBaseUrl, getBootstrapManager, getBreadCrumbs, getChainEquiv, getConcurrentBuildsEnabled, getConglomerateCookieValue, getCookieCutter, getCookieValue, getCurrentFormTheme, getCurrentSystemTime, getCurrentUrl, getDefaultPersister, getDescriptionFromLabelKey, getElasticConfig, getErrorMessages, getErrors, getFeatureManager, getFieldErrorAccessTracker, getFieldErrors, getFlushedErrorMessages, getFormattedActionErrors, getFormattedActionMessages, getFormattedActionWarnings, getHelpPanels, getInstanceName, getJobEquiv, getJsonObject, getNavigationContext, getNavigationUrl, getNodeLifecycleState, getNumberOfCurrentlyBuildingPlans, getPlan, getPlanManager, getPluginAccessor, getRandomString, getReturnUrl, getSecuredDomainObject, getSessionUser, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTextProvider, getTexts, getTexts, getTextWithArgs, getTotalErrors, getUser, getValidatorContext, getWebFragmentsContextMap, getWebItemsForSection, getWebPanelContext, getWebSectionsForLocation, hasActionWarnings, hasAdminPermission, hasAnyErrors, hasBuilds, hasEntityPermission, hasGlobalAdminPermission, hasGlobalPermission, hasGlobalPermission, hasKey, hasPlanPermission, hasPlanPermission, hasProjectPermission, hasProjectPermission, hasRestrictedAdminPermission, hasResultKeyReadPermission, isCheckboxSetInAction, isEnableJavascript, isEnableSignup, isInlineDialog, isRestrictedAdminEnabled, isSelectFieldAndNull, isViewContactDetailsEnabled, renderFreemarkerTemplate, setAdministrationConfigurationAccessor, setAdministrationConfigurationManager, setAdministrationConfigurationPersister, setAuthenticationContext, setBambooLicenseManager, setBambooPermissionManager, setBambooUserManager, setBuildDefinitionManager, setCachedPlanManager, setChainEquiv, setCheckBoxFields, setCookieCutter, setCurrentFormTheme, setDecorator, setDeploymentProjectService, setDocumentationLinkProvider, setEnableJavascript, setEnvironmentService, setErrorMessages, setFeatureManager, setI18nBeanFactory, setJobEquiv, setJsonator, setLocalizedTextProvider, setNavigationContext, setNodeLifecycleProvider, setPlanExecutionManager, setPlanManager, setPluginAccessor, setProfile, setProjectManager, setReturnUrl, setWebInterfaceManager, streamJson, toJson, toJson
-
Methods inherited from class com.opensymphony.xwork2.ActionSupport
addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, execute, getActionErrors, getActionMessages, getContainer, getFormatted, getLocale, getLocaleProvider, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, input, isValidLocale, isValidLocaleString, pause, setActionErrors, setActionMessages, setContainer, setFieldErrors, validate
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.utils.error.ErrorCollection
getAllErrorMessages
-
-
-
-
Field Detail
-
aclService
protected HibernateMutableAclService aclService
-
aclUpdateHelper
protected BambooAclUpdateHelper aclUpdateHelper
-
userManager
protected com.atlassian.user.UserManager userManager
-
acl
protected org.acegisecurity.acls.MutableAcl acl
-
newUser
protected String newUser
-
newGroup
protected String newGroup
-
addUserPrincipal
protected String addUserPrincipal
-
addGroupPrincipal
protected String addGroupPrincipal
-
principalType
protected String principalType
-
entityId
protected long entityId
-
-
Method Detail
-
getAcl
@Nullable public abstract @Nullable org.acegisecurity.acls.MutableAcl getAcl()
-
getEntityName
@NotNull public abstract @NotNull String getEntityName()
-
getEntityType
@NotNull public abstract @NotNull Class<?> getEntityType()
Class of the entity on which the permissions are being modified. Will be used to constructObjectIdentity
.This method doesn't need to return the effective ACL entity class, as it will be proxied via
ObjectIdentityUtils.getAclClassForEntityClass(Class)
.
-
getEntityAclType
@NotNull public @NotNull Class<?> getEntityAclType()
-
getEditablePermissions
@NotNull public abstract @NotNull Map<String,String> getEditablePermissions()
-
getMinimalPermission
public BambooPermission getMinimalPermission()
Minimal permission to grant when adding new principal.
-
showAdminPermissions
public boolean showAdminPermissions()
-
populatePermissionLists
protected void populatePermissionLists()
-
hasParameters
protected boolean hasParameters()
-
updateAcl
protected void updateAcl(org.acegisecurity.acls.MutableAcl acl)
-
bulkUpdateAcls
protected void bulkUpdateAcls(org.acegisecurity.acls.MutableAcl acl, List<String> permissions)
-
saveAllPermissions
protected String saveAllPermissions()
-
doInputPrincipal
public String doInputPrincipal()
-
setAclService
public void setAclService(HibernateMutableAclService aclService)
-
setAclUpdateHelper
public void setAclUpdateHelper(BambooAclUpdateHelper aclUpdateHelper)
-
setAcl
public void setAcl(org.acegisecurity.acls.MutableAcl acl)
-
getGrantedUsersDisplayNames
@NotNull public @NotNull Map<String,String> getGrantedUsersDisplayNames()
-
getNewUser
public String getNewUser()
-
setNewUser
public void setNewUser(String newUser)
-
getNewGroup
public String getNewGroup()
-
setNewGroup
public void setNewGroup(String newGroup)
-
getEntityId
public long getEntityId()
-
setEntityId
public void setEntityId(long entityId)
-
getAddUserPrincipal
public String getAddUserPrincipal()
-
setAddUserPrincipal
public void setAddUserPrincipal(String addUserPrincipal)
-
getAddGroupPrincipal
public String getAddGroupPrincipal()
-
setAddGroupPrincipal
public void setAddGroupPrincipal(String addGroupPrincipal)
-
getPrincipalType
public String getPrincipalType()
-
setPrincipalType
public void setPrincipalType(String principalType)
-
hasEditPermissionForUserName
public boolean hasEditPermissionForUserName(String userName)
-
hasEditPermissionForUser
public boolean hasEditPermissionForUser(BambooUser user)
-
hasEditPermissionForGroup
public boolean hasEditPermissionForGroup(String groupName)
-
setUserManager
public void setUserManager(com.atlassian.user.UserManager userManager)
-
-