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 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 Collection<String> |
READ_ONLY_SPACE_PERMISSIONS |
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()
Deprecated.
|
SpacePermission(SpacePermission spacePermission)
Deprecated.
|
SpacePermission(String type)
Deprecated.
|
SpacePermission(String type,
Space space)
Deprecated.
|
SpacePermission(String type,
@Nullable Space space,
String group)
Deprecated.
|
SpacePermission(String type,
@Nullable Space space,
@Nullable String group,
@Nullable ConfluenceUser subject)
Deprecated.
|
SpacePermission(String type,
@Nullable Space space,
@Nullable String group,
@Nullable 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,
@Nullable Space space) |
static SpacePermission |
createAuthenticatedUsersSpacePermission(String type,
@Nullable Space space)
Creates a permission which is granted to all authenticated users, including unlicensed users.
|
static SpacePermission |
createGroupSpacePermission(String type,
@Nullable Space space,
String group) |
static SpacePermission |
createUserSpacePermission(String type,
@Nullable Space space,
ConfluenceUser subject) |
static SpacePermission |
createUserSpacePermission(String type,
@Nullable Space space,
String userName)
Deprecated.
|
boolean |
equals(Object obj) |
String |
getAllUsersSubject() |
@Nullable String |
getGroup() |
@Nullable Space |
getSpace()
The space of this permission.
|
long |
getSpaceId() |
String |
getType() |
@Nullable String |
getUserName()
Deprecated.
since 5.2. Use
getUserSubject() instead. |
@Nullable 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(@Nullable 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(@Nullable 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
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> READ_ONLY_SPACE_PERMISSIONS
public static final Collection<String> GLOBAL_PERMISSIONS
public static final Collection<String> INVALID_ANONYMOUS_PERMISSIONS
@Deprecated public SpacePermission()
createUserSpacePermission(String, Space, ConfluenceUser)
createGroupSpacePermission(String, Space, String)
@Deprecated public SpacePermission(String type)
createUserSpacePermission(String, Space, ConfluenceUser)
createGroupSpacePermission(String, Space, String)
@Deprecated public SpacePermission(String type, Space space)
createUserSpacePermission(String, Space, ConfluenceUser)
createGroupSpacePermission(String, Space, String)
@Deprecated public SpacePermission(String type, @Nullable Space space, String group)
createUserSpacePermission(String, Space, ConfluenceUser)
createGroupSpacePermission(String, Space, String)
@Deprecated public SpacePermission(String type, @Nullable Space space, @Nullable String group, @Nullable String userName)
@Deprecated public SpacePermission(String type, @Nullable Space space, @Nullable String group, @Nullable ConfluenceUser subject)
createUserSpacePermission(String, Space, ConfluenceUser)
createGroupSpacePermission(String, Space, String)
@Deprecated public SpacePermission(SpacePermission spacePermission)
createUserSpacePermission(String, Space, ConfluenceUser)
createGroupSpacePermission(String, Space, String)
ConfluenceEntityObject
state.spacePermission
- a spacePermission to replicate.public @Nullable Space getSpace()
public void setSpace(@Nullable Space space)
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.public @Nullable String getGroup()
@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 @Nullable String getUserName()
getUserSubject()
instead.@Deprecated public void setUserName(String userName)
setUserSubject(ConfluenceUser)
instead.public @Nullable ConfluenceUser getUserSubject()
public void setUserSubject(@Nullable ConfluenceUser user)
createUserSpacePermission(java.lang.String, com.atlassian.confluence.spaces.Space, java.lang.String)
@EnsuresNonNullIf(expression={"getUserSubject()","getUserName()"}, result=true) public boolean isUserPermission()
@EnsuresNonNullIf(expression="getGroup()", result=true) public boolean isGroupPermission()
public boolean isAnonymousPermission()
public boolean isAuthenticatedUsersPermission()
@EnsuresNonNullIf(expression="getSpace()", result=false) public boolean isGlobalPermission()
@EnsuresNonNullIf(expression="getSpace()", result=true) 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 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, @Nullable Space space)
@Deprecated public static SpacePermission createUserSpacePermission(String type, @Nullable 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–2023 Atlassian. All rights reserved.