public class SpacePermission extends ConfluenceEntityObject implements Serializable
Modifier and Type | Field and Description |
---|---|
static String |
ADMINISTER_SPACE_PERMISSION |
static String |
BROWSE_USERS_PERMISSION
A permission type to control whether a user can browse for users in the system, such as in user auto-completes or
view profile information of other users.
|
static String |
COMMENT_PERMISSION |
static String |
CONFLUENCE_ADMINISTRATOR_PERMISSION
Permission type to do anything in Confluence that can't affect the system on which it runs.
|
static String |
CREATE_ATTACHMENT_PERMISSION |
static String |
CREATE_SPACE_PERMISSION |
static String |
CREATEEDIT_PAGE_PERMISSION |
static String |
EDITBLOG_PERMISSION |
static String |
EXPORT_SPACE_PERMISSION |
static String |
FORM_PARAMETER_PREFIX
Deprecated.
Since 5.3 Use
PermissionsFormHandler.FORM_PARAMETER_PREFIX |
static String |
FORM_PARAMETER_SEPARATOR
Deprecated.
Since 5.3 Use
PermissionsFormHandler.FORM_PARAMETER_SEPARATOR |
static String |
FULL_FORM_PARAMETER_PREFIX
Deprecated.
Since 5.3 Use
PermissionsFormHandler.FULL_FORM_PARAMETER_PREFIX |
static Collection<String> |
GENERIC_SPACE_PERMISSIONS
represents all permissions which can be used to build SpacePermissions.
|
static Collection<String> |
GLOBAL_PERMISSIONS
A list of all global permissions
|
static Collection<String> |
INVALID_ANONYMOUS_PERMISSIONS
A list of all permissions that can not be assigned to the anonymous user
|
static String |
LIMITED_USE_CONFLUENCE_PERMISSION
Users can be granted unlicensed authenticated access (limited) to Confluence, by being assigned this
permission.
|
static Collection<String> |
PERMISSION_TYPES
A list of all possible permissions
|
static String |
PERSONAL_SPACE_PERMISSION |
static String |
PROFILE_ATTACHMENT_PERMISSION |
static String |
REMOVE_ATTACHMENT_PERMISSION |
static String |
REMOVE_BLOG_PERMISSION |
static String |
REMOVE_COMMENT_PERMISSION |
static String |
REMOVE_MAIL_PERMISSION |
static String |
REMOVE_OWN_CONTENT_PERMISSION |
static String |
REMOVE_PAGE_PERMISSION |
static String |
SET_PAGE_PERMISSIONS_PERMISSION |
static String |
SYSTEM_ADMINISTRATOR_PERMISSION
Permission type to do anything at all in Confluence.
|
static String |
UPDATE_USER_STATUS_PERMISSION
A permission type to control whether a user can update their user status.
|
static String |
USE_CONFLUENCE_PERMISSION
Note: this should no longer be checked directly, use
ConfluenceAccessManager instead. |
static String |
VIEW_USER_PROFILES_PERMISSION
Deprecated.
since 5.9. Use
BROWSE_USERS_PERMISSION instead. |
static String |
VIEWSPACE_PERMISSION
View content within the space, including pages, blogposts etc.
|
Constructor and Description |
---|
SpacePermission() |
SpacePermission(SpacePermission spacePermission)
Creates a new SpacePermission with the attributes of another.
|
SpacePermission(String type) |
SpacePermission(String type,
Space space) |
SpacePermission(String type,
Space space,
String group) |
SpacePermission(String type,
Space space,
String group,
ConfluenceUser subject) |
SpacePermission(String type,
Space space,
String group,
String userName)
Deprecated.
since 3.0, as passing both group and userName leads to an invalid permission
|
Modifier and Type | Method and Description |
---|---|
static SpacePermission |
createAnonymousSpacePermission(String type,
Space space) |
static SpacePermission |
createAuthenticatedUsersSpacePermission(String type,
Space space)
Creates a permission which is granted to all authenticated (logged in) users
|
static SpacePermission |
createGroupSpacePermission(String type,
Space space,
String group) |
static SpacePermission |
createUserSpacePermission(String type,
Space space,
ConfluenceUser subject) |
static SpacePermission |
createUserSpacePermission(String type,
Space space,
String userName)
Deprecated.
|
boolean |
equals(Object obj) |
static SpacePermission |
fromFormParameterName(String formParameterName,
Space space,
String parameterType)
Deprecated.
|
String |
getAllUsersSubject() |
static Collection<SpacePermission> |
getDefaultGlobalPermissions()
Deprecated.
since 5.2. Use
SpacePermissionManager.getDefaultGlobalPermissions() instead.
Returns the default global permissions that are created when Confluence is set up. These will exist in a newly set up system but may be removed afterwards. Note that the returned objects are freshly created and therefore do not have IDs or other persistence data. By default, confluence-administrators group has admin access, the default users group can view the system and anonymous access is disabled. |
static Collection<String> |
getGenericSpacePermissions()
Deprecated.
since 3.0, why do we even need a getter
|
String |
getGroup() |
Space |
getSpace()
The space of this permission.
|
long |
getSpaceId() |
String |
getType() |
String |
getUserName()
Deprecated.
since 5.2. Use
getUserSubject() instead. |
ConfluenceUser |
getUserSubject() |
int |
hashCode() |
boolean |
isAnonymousPermission() |
boolean |
isAuthenticatedUsersPermission() |
boolean |
isDependentOn(SpacePermission otherPermission)
One permission is dependent on another if the other permission is a guard permission that applies to the same
space/global scope, and to the same group / user / "all users" subject as this permission.
|
boolean |
isGlobalPermission() |
boolean |
isGroupPermission() |
boolean |
isGuardPermission()
Is this a guard permission, either globally or at the space level? Guard permissions are required
before any more permissions can be added for a particular user/group in a particular scope.
|
boolean |
isInvalidAnonymousPermission()
Some permissions are not valid as they can not be assigned to the anonymous user.
|
boolean |
isInvalidAuthenticatedUsersPermission() |
boolean |
isSpacePermission() |
boolean |
isUserPermission() |
static boolean |
isValidAnonymousPermission(String permissionType) |
static boolean |
isValidAuthenticatedUsersPermission(String permissionType) |
protected void |
setAllUsersSubject(String storedValue) |
void |
setGroup(String group)
Deprecated.
|
void |
setSpace(Space space) |
void |
setType(String type)
Deprecated.
since 5.9. Use one of the factory methods such as
createGroupSpacePermission(java.lang.String, com.atlassian.confluence.spaces.Space, java.lang.String) instead. |
void |
setUserName(String userName)
Deprecated.
since 5.2. See
setUserSubject(ConfluenceUser) instead. |
void |
setUserSubject(ConfluenceUser user)
Deprecated.
|
String |
toFormParameterName(String parameterType)
Deprecated.
As of 2.7.2, use
PermissionRow.buildParameterName(String, String) . |
String |
toString() |
getCreator, getCreatorName, getLastModifier, getLastModifierName, getRealClass, isPersistent, setCreator, setCreatorName, setLastModifier, setLastModifierName
@Deprecated public static final String FORM_PARAMETER_PREFIX
PermissionsFormHandler.FORM_PARAMETER_PREFIX
@Deprecated public static final String FORM_PARAMETER_SEPARATOR
PermissionsFormHandler.FORM_PARAMETER_SEPARATOR
@Deprecated public static final String FULL_FORM_PARAMETER_PREFIX
PermissionsFormHandler.FULL_FORM_PARAMETER_PREFIX
public static final String USE_CONFLUENCE_PERMISSION
ConfluenceAccessManager
instead.public static final String LIMITED_USE_CONFLUENCE_PERMISSION
ConfluenceAccessManager
OR annotations such as
RequiresAnyConfluenceAccess
instead.public static final String UPDATE_USER_STATUS_PERMISSION
@Deprecated public static final String VIEW_USER_PROFILES_PERMISSION
BROWSE_USERS_PERMISSION
instead.public static final String BROWSE_USERS_PERMISSION
public static final String SYSTEM_ADMINISTRATOR_PERMISSION
public static final String CONFLUENCE_ADMINISTRATOR_PERMISSION
public static final String PERSONAL_SPACE_PERMISSION
public static final String CREATE_SPACE_PERMISSION
public static final String PROFILE_ATTACHMENT_PERMISSION
public static final String VIEWSPACE_PERMISSION
public static final String REMOVE_OWN_CONTENT_PERMISSION
public static final String COMMENT_PERMISSION
public static final String CREATEEDIT_PAGE_PERMISSION
public static final String ADMINISTER_SPACE_PERMISSION
public static final String REMOVE_PAGE_PERMISSION
public static final String REMOVE_COMMENT_PERMISSION
public static final String REMOVE_BLOG_PERMISSION
public static final String CREATE_ATTACHMENT_PERMISSION
public static final String REMOVE_ATTACHMENT_PERMISSION
public static final String EDITBLOG_PERMISSION
public static final String EXPORT_SPACE_PERMISSION
public static final String REMOVE_MAIL_PERMISSION
public static final String SET_PAGE_PERMISSIONS_PERMISSION
public static final Collection<String> PERMISSION_TYPES
public static final Collection<String> GENERIC_SPACE_PERMISSIONS
public static final Collection<String> GLOBAL_PERMISSIONS
public static final Collection<String> INVALID_ANONYMOUS_PERMISSIONS
public SpacePermission()
public SpacePermission(String type)
@Deprecated public SpacePermission(String type, @Nullable Space space, @Nullable String group, @Nullable String userName)
public SpacePermission(String type, @Nullable Space space, @Nullable String group, @Nullable ConfluenceUser subject)
public SpacePermission(SpacePermission spacePermission)
ConfluenceEntityObject
state.spacePermission
- a spacePermission to replicate.@Deprecated public static SpacePermission fromFormParameterName(String formParameterName, Space space, String parameterType) throws ParseException
PermissionsFormHandler.fromFormParameterName(String, com.atlassian.confluence.spaces.Space, String)
ParseException
public long getSpaceId()
public String getType()
@Deprecated public void setType(String type)
createGroupSpacePermission(java.lang.String, com.atlassian.confluence.spaces.Space, java.lang.String)
instead.@Deprecated public void setGroup(String group)
createGroupSpacePermission(java.lang.String, com.atlassian.confluence.spaces.Space, java.lang.String)
instead.public String getAllUsersSubject()
protected void setAllUsersSubject(String storedValue)
@Deprecated public String getUserName()
getUserSubject()
instead.@Deprecated public void setUserName(String userName)
setUserSubject(ConfluenceUser)
instead.@Nullable public ConfluenceUser getUserSubject()
public void setUserSubject(ConfluenceUser user)
createUserSpacePermission(java.lang.String, com.atlassian.confluence.spaces.Space, java.lang.String)
public boolean isUserPermission()
public boolean isGroupPermission()
public boolean isAnonymousPermission()
public boolean isAuthenticatedUsersPermission()
public boolean isGlobalPermission()
public boolean isSpacePermission()
public boolean equals(Object obj)
equals
in class com.atlassian.core.bean.EntityObject
public int hashCode()
hashCode
in class com.atlassian.core.bean.EntityObject
@Deprecated public static Collection<String> getGenericSpacePermissions()
@Deprecated public static Collection<SpacePermission> getDefaultGlobalPermissions()
SpacePermissionManager.getDefaultGlobalPermissions()
instead.
Returns the default global permissions that are created when Confluence is set up. These will exist in a newly set up system but may be removed afterwards. Note that the returned objects are freshly created and therefore do not have IDs or other persistence data.
By default, confluence-administrators group has admin access, the default users group can view the system and anonymous access is disabled.
SpacePermission
s.@Deprecated public String toFormParameterName(String parameterType)
PermissionRow.buildParameterName(String, String)
.PermissionsFormHandler.fromFormParameterName(java.lang.String, com.atlassian.confluence.spaces.Space, java.lang.String)
The format of the parameter name is:
confluence_[parameterType]_[permissionType]_[user/group/anonymous]_[user/group name]
Note: the space is NOT encoded in the form parameter name, and must be kept separately.
parameterType
- distinguishes the parameter from other parameters created with the same permission.public boolean isGuardPermission()
public boolean isDependentOn(SpacePermission otherPermission)
otherPermission
- - permission to check againstpublic boolean isInvalidAnonymousPermission()
public static boolean isValidAnonymousPermission(String permissionType)
public boolean isInvalidAuthenticatedUsersPermission()
public static boolean isValidAuthenticatedUsersPermission(String permissionType)
public static SpacePermission createAnonymousSpacePermission(String type, Space space)
@Deprecated public static SpacePermission createUserSpacePermission(String type, Space space, String userName)
createUserSpacePermission(String, com.atlassian.confluence.spaces.Space, com.atlassian.confluence.user.ConfluenceUser)
instead.public static SpacePermission createUserSpacePermission(String type, @Nullable Space space, ConfluenceUser subject)
public static SpacePermission createGroupSpacePermission(String type, @Nullable Space space, String group)
public static SpacePermission createAuthenticatedUsersSpacePermission(String type, @Nullable Space space)
Copyright © 2003–2017 Atlassian. All rights reserved.