Class AbstractPermissionsAction
java.lang.Object
org.apache.struts2.ActionSupport
com.opensymphony.xwork2.ActionSupport
com.atlassian.confluence.core.AbstractI18nActionSupport
com.atlassian.confluence.core.ConfluenceActionSupport
com.atlassian.confluence.security.actions.AbstractPermissionsAction
- All Implemented Interfaces:
BootstrapAware
,WebInterface
,PermissionsAware
,MessageHolderAware
,com.opensymphony.xwork2.Action
,com.opensymphony.xwork2.interceptor.ValidationAware
,com.opensymphony.xwork2.LocaleProvider
,com.opensymphony.xwork2.TextProvider
,com.opensymphony.xwork2.Validateable
,Serializable
,org.apache.struts2.action.Action
,org.apache.struts2.interceptor.ValidationAware
,org.apache.struts2.Validateable
- Direct Known Subclasses:
AbstractEditPermissionAction
,ViewGlobalPermissionsAction
,ViewSpacePermissionDefaultsAction
,ViewSpacePermissionsAction
public abstract class AbstractPermissionsAction
extends ConfluenceActionSupport
implements PermissionsAware, BootstrapAware
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.opensymphony.xwork2.interceptor.ValidationAware
com.opensymphony.xwork2.interceptor.ValidationAware.LegacyAdapter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected PermissionRow
protected Collection<PermissionRow>
Map of groupnames toDefaultPermissionsAdministrator.GroupPermissionRow
s.protected PermissionsAdministratorBuilder
protected Collection<PermissionRow>
Map of usernames toDefaultPermissionsAdministrator.UserPermissionRow
s.Fields inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
accessModeService, CANCEL, confluenceAccessManager, contentUiSupport, eventPublisher, formatSettingsManager, globalSettingsManager, i18NBeanFactory, labelManager, languageManager, LICENSE_EXPIRED, LICENSE_USERS_EXCEEDED, localeManager, loginManager, messageHolder, permissionManager, pluginAccessor, PREVIEW, request, response, spacePermissionManager, strutsHelper, systemInformationService, userAccessor, webInterfaceManager
Fields inherited from class org.apache.struts2.ActionSupport
container
Fields inherited from interface org.apache.struts2.action.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Retrieves the anonymous permissions row for printing in a UI.Gets the list of currentDefaultPermissionsAdministrator.GroupPermissionRow
s for printing in a UI.Returns the parameters of the requestRetrieves the unlicensed authenticated user permissions row for printing in a UI.Gets the list of currentDefaultPermissionsAdministrator.UserPermissionRow
s for printing in a UI.boolean
boolean
Show the permissions UI for unlicensed authenticated users if any global authenticated user permissions are present.boolean
Temporary method until we have plugin points to require i18n keys.boolean
isValidAnonymousPermission
(String permissionType) Check whether this space permission is allowed to be assigned to the 'anonymous' category.boolean
isValidAuthenticatedUsersPermission
(String permissionType) Check whether this space permission is allowed to be assigned to the 'authenticated users' category.void
setPermissionsAdministratorBuilder
(PermissionsAdministratorBuilder permissionsAdministratorBuilder) Methods inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
addActionError, addActionMessage, addFieldError, addPermissionTypeTo, addToHistory, doDefault, getActionErrors, getActionMessages, getActionName, getAuthenticatedUser, getBootstrapStatusProvider, getCancelResult, getCurrentRequest, getCurrentResponse, getDateFormatter, getDefaultTimeZone, getFieldErrors, getGlobalSettings, getHelper, getI18n, getLocale, getMessageHolder, getPermissionTypes, getPermittedEntitiesOf, getPermittedEntitiesOf, getPermittedEntitiesOf, getPreviousLoginDate, getTimeZone, getUserByName, getUserInterfaceState, getWebInterfaceContext, isAnonymousUser, isEmailVisible, isPermitted, setAccessModeService, setBootstrapStatusProvider, setCancel, setConfluenceAccessManager, setContentUiSupport, setEventPublisher, setFormatSettingsManager, setI18NBean, setI18NBeanFactory, setLabelManager, setLanguageManager, setLocaleManager, setLoginManager, setMessageHolder, setPermissionManager, setPluginAccessor, setPreviousLoginDate, setSettingsManager, setSkipIsPermitted, setSpacePermissionManager, setStrutsHelper, setSystemInformationService, setTimeZoneManager, setUserAccessor, setWebInterfaceManager, shouldSkipIsPermitted
Methods inherited from class com.atlassian.confluence.core.AbstractI18nActionSupport
getText, getText, getText, getText, getText, getText, getText, getText, getTextStrict
Methods inherited from class org.apache.struts2.ActionSupport
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, execute, getContainer, getFormatted, getLocaleProvider, getText, getText, getTextProvider, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, input, isValidLocale, isValidLocaleString, pause, setActionErrors, setActionMessages, setContainer, setFieldErrors, toLocale, validate
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.struts2.action.Action
execute
Methods inherited from interface com.atlassian.confluence.validation.MessageHolderAware
validate
Methods inherited from interface com.atlassian.confluence.security.actions.PermissionsAware
getGuardPermission, getPermissionsAdministrator, populateAdministrator
Methods inherited from interface org.apache.struts2.interceptor.ValidationAware
addActionError, addActionMessage, addFieldError, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, setActionErrors, setActionMessages, setFieldErrors
-
Field Details
-
userPermissionRows
Map of usernames toDefaultPermissionsAdministrator.UserPermissionRow
s. -
groupPermissionRows
Map of groupnames toDefaultPermissionsAdministrator.GroupPermissionRow
s. -
anonymousPermissionRow
-
permissionsAdministratorBuilder
-
-
Constructor Details
-
AbstractPermissionsAction
public AbstractPermissionsAction()
-
-
Method Details
-
setPermissionsAdministratorBuilder
public void setPermissionsAdministratorBuilder(PermissionsAdministratorBuilder permissionsAdministratorBuilder) -
getUserPermissionRows
Gets the list of currentDefaultPermissionsAdministrator.UserPermissionRow
s for printing in a UI.- Specified by:
getUserPermissionRows
in interfacePermissionsAware
- Returns:
- list of
DefaultPermissionsAdministrator.UserPermissionRow
-
getGroupPermissionRows
Gets the list of currentDefaultPermissionsAdministrator.GroupPermissionRow
s for printing in a UI.- Specified by:
getGroupPermissionRows
in interfacePermissionsAware
- Returns:
- list of
DefaultPermissionsAdministrator.GroupPermissionRow
-
getUnlicensedAuthenticatedPermissionRow
Description copied from interface:PermissionsAware
Retrieves the unlicensed authenticated user permissions row for printing in a UI.- Specified by:
getUnlicensedAuthenticatedPermissionRow
in interfacePermissionsAware
- Returns:
- the unlicensed authenticated user permissions.
-
getAnonymousPermissionRow
Description copied from interface:PermissionsAware
Retrieves the anonymous permissions row for printing in a UI.- Specified by:
getAnonymousPermissionRow
in interfacePermissionsAware
- Returns:
- the anonymous permissions.
-
isValidAnonymousPermission
Check whether this space permission is allowed to be assigned to the 'anonymous' category.- Parameters:
permissionType
- aSpacePermission
value
-
isValidAuthenticatedUsersPermission
Check whether this space permission is allowed to be assigned to the 'authenticated users' category.- Parameters:
permissionType
- aSpacePermission
value
-
getRequestParams
Description copied from interface:PermissionsAware
Returns the parameters of the request- Specified by:
getRequestParams
in interfacePermissionsAware
- Returns:
- the parameters of the request
-
bootstrap
public void bootstrap()- Specified by:
bootstrap
in interfaceBootstrapAware
-
isAdminUser
public boolean isAdminUser() -
getPermissions
-
isUserStatusPluginEnabled
public boolean isUserStatusPluginEnabled()Temporary method until we have plugin points to require i18n keys. CONF-15428- Returns:
- true if "user status" is enabled.
-
isShowGlobalUnlicensedUsersUI
public boolean isShowGlobalUnlicensedUsersUI()Show the permissions UI for unlicensed authenticated users if any global authenticated user permissions are present.- Returns:
- true if there are any permissions in the system for which
SpacePermission.isAuthenticatedUsersPermission()
returns true
-