Class AbstractPermissionsAction
- java.lang.Object
-
- com.opensymphony.xwork2.ActionSupport
-
- 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
- Direct Known Subclasses:
AbstractEditPermissionAction
,ViewGlobalPermissionsAction
,ViewSpacePermissionDefaultsAction
,ViewSpacePermissionsAction
public abstract class AbstractPermissionsAction extends ConfluenceActionSupport implements PermissionsAware, BootstrapAware
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected PermissionRow
anonymousPermissionRow
protected Collection<PermissionRow>
groupPermissionRows
Map of groupnames toDefaultPermissionsAdministrator.GroupPermissionRow
s.protected PermissionsAdministratorBuilder
permissionsAdministratorBuilder
protected Collection<PermissionRow>
userPermissionRows
Map of usernames toDefaultPermissionsAdministrator.UserPermissionRow
s.-
Fields inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
accessModeService, CANCEL, DEVMODE, eventManager, i18NBeanFactory, labelManager, languageManager, LICENSE_EXPIRED, LICENSE_USERS_EXCEEDED, messageHolder, permissionManager, permitted, personService, pluginAccessor, PREVIEW, settingsManager, spacePermissionManager, userAccessor, webInterfaceManager
-
-
Constructor Summary
Constructors Constructor Description AbstractPermissionsAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bootstrap()
PermissionRow
getAnonymousPermissionRow()
Retrieves the anonymous permissions row for printing in a UI.Collection<PermissionRow>
getGroupPermissionRows()
Gets the list of currentDefaultPermissionsAdministrator.GroupPermissionRow
s for printing in a UI.List<String>
getPermissions()
Map
getRequestParams()
Returns the parameters of the requestPermissionRow
getUnlicensedAuthenticatedPermissionRow()
Retrieves the unlicensed authenticated user permissions row for printing in a UI.Collection<PermissionRow>
getUserPermissionRows()
Gets the list of currentDefaultPermissionsAdministrator.UserPermissionRow
s for printing in a UI.boolean
isAdminUser()
boolean
isShowGlobalUnlicensedUsersUI()
Show the permissions UI for unlicensed authenticated users if any global authenticated user permissions are present.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, formatFriendlyDate, getAccessMode, getActionName, getActionName, getAuthenticatedUser, getBootstrapManager, getBootstrapStatusProvider, getCancel, getCancelResult, getConfluenceAccessManager, getContext, getCurrentRequest, getCurrentSession, getDateFormatSetting, getDateFormatter, getDefaultResourceBundle, getDefaultTimeZone, getDocLink, getEventManager, getFriendlyDateFormatter, getFrontendServiceURL, getGlobalSettings, getHelper, getI18n, getInstalledLanguages, getLabelManager, getLanguageJs, getLanguageManager, getLanguageUserFriendly, getLocale, getLocaleManager, getLocaleString, getMessageHolder, getNiceContentType, getPermissionManager, getPermissionTypes, getPermittedEntitiesOf, getPermittedEntitiesOf, getPermittedEntitiesOf, getPersonService, getPreviousLoginDate, getRemoteUser, getSession, getSystemInformationService, getText, getText, getText, getText, getText, getText, getText, getText, getTextStatic, getTextStatic, getTextStrict, getTimeZone, getUserAccessor, getUserByName, getUserFullName, getUserHasBrowseUsersPermission, getUserHasLicensedAccess, getUserInterfaceState, getUserLocaleDefaultDatePattern, getUserProfilePicUrl, getWebInterfaceContext, getWebInterfaceManager, hasPermissionForSpace, isAnonymousUser, isCanceled, isDevMode, isEmailVisible, isExternalUserManagementEnabled, isLabelable, isPermitted, isPrintableVersion, isSkipAccessCheck, isUserStatusPluginEnabled, isUsingH2, isUsingHSQL, setAccessModeService, setApiContentUiSupport, setApiDateFormatService, setApiPersonService, setBootstrapManager, setCancel, setConfluenceAccessManager, setContentUiSupport, setEventManager, setFormatSettingsManager, setI18NBean, setI18NBeanFactory, setLabelManager, setLanguageManager, setLocaleManager, setLoginManager, setMessageHolder, setPermissionManager, setPluginAccessor, setPreviousLoginDate, setServletRequestSupplier, setSettingsManager, setSkipAccessCheck, setSpacePermissionManager, setSystemInformationService, setTimeZoneManager, setUserAccessor, setWebInterfaceManager, withServletRequestSupplier
-
Methods inherited from class com.opensymphony.xwork2.ActionSupport
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, execute, getActionErrors, getActionMessages, getContainer, getFieldErrors, getFormatted, getLocaleProvider, getText, getText, getTextProvider, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, 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.opensymphony.xwork2.LocaleProvider
isValidLocale, isValidLocaleString
-
Methods inherited from interface com.atlassian.confluence.validation.MessageHolderAware
validate
-
Methods inherited from interface com.atlassian.confluence.security.actions.PermissionsAware
getGuardPermission, getPermissionsAdministrator, populateAdministrator
-
-
-
-
Field Detail
-
userPermissionRows
protected Collection<PermissionRow> userPermissionRows
Map of usernames toDefaultPermissionsAdministrator.UserPermissionRow
s.
-
groupPermissionRows
protected Collection<PermissionRow> groupPermissionRows
Map of groupnames toDefaultPermissionsAdministrator.GroupPermissionRow
s.
-
anonymousPermissionRow
protected PermissionRow anonymousPermissionRow
-
permissionsAdministratorBuilder
protected PermissionsAdministratorBuilder permissionsAdministratorBuilder
-
-
Method Detail
-
setPermissionsAdministratorBuilder
public void setPermissionsAdministratorBuilder(PermissionsAdministratorBuilder permissionsAdministratorBuilder)
-
getUserPermissionRows
public Collection<PermissionRow> getUserPermissionRows()
Gets the list of currentDefaultPermissionsAdministrator.UserPermissionRow
s for printing in a UI.- Specified by:
getUserPermissionRows
in interfacePermissionsAware
- Returns:
- list of
DefaultPermissionsAdministrator.UserPermissionRow
-
getGroupPermissionRows
public Collection<PermissionRow> getGroupPermissionRows()
Gets the list of currentDefaultPermissionsAdministrator.GroupPermissionRow
s for printing in a UI.- Specified by:
getGroupPermissionRows
in interfacePermissionsAware
- Returns:
- list of
DefaultPermissionsAdministrator.GroupPermissionRow
-
getUnlicensedAuthenticatedPermissionRow
public PermissionRow 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
public PermissionRow 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
public boolean isValidAnonymousPermission(String permissionType)
Check whether this space permission is allowed to be assigned to the 'anonymous' category.- Parameters:
permissionType
- aSpacePermission
value
-
isValidAuthenticatedUsersPermission
public boolean isValidAuthenticatedUsersPermission(String permissionType)
Check whether this space permission is allowed to be assigned to the 'authenticated users' category.- Parameters:
permissionType
- aSpacePermission
value
-
getRequestParams
public Map 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()
-
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
-
-