|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.core.bean.EntityObject com.atlassian.confluence.core.ConfluenceEntityObject com.atlassian.confluence.security.SpacePermission
public class SpacePermission
A SpacePermission restricts access to different functions on a space. A a SpacePermission is defined for a permissionType then that permissionType is not permitted, otherwise if it's not it's permitted.
Constructor Summary | |
---|---|
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,
String userName)
Deprecated. since 3.0, as passing both group and userName leads to an invalid permission |
Method Summary | |
---|---|
static SpacePermission |
createAnonymousSpacePermission(String type,
Space space)
|
static SpacePermission |
createGroupSpacePermission(String type,
Space space,
String group)
|
static SpacePermission |
createUserSpacePermission(String type,
Space space,
String userName)
|
boolean |
equals(Object obj)
For CONF-9469 the equals implementation will ignore the case of the permission user name and group name. |
static SpacePermission |
fromFormParameterName(String formParameterName,
Space space,
String parameterType)
Convert a form parameter name into a space permission. |
static Collection<SpacePermission> |
getDefaultGlobalPermissions()
Returns the default global permissions that are created when Confluence is set up. |
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()
|
int |
hashCode()
|
boolean |
isAdministrativePermission()
Deprecated. since Confluence 2.7. Not used in Confluence core at the moment. |
boolean |
isAnonymousPermission()
|
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 or user 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 |
isSpacePermission()
|
boolean |
isUserPermission()
|
void |
setGroup(String group)
|
void |
setSpace(Space space)
|
void |
setType(String type)
|
void |
setUserName(String userName)
|
String |
toFormParameterName(String parameterType)
Deprecated. As of 2.7.2, use PermissionRow.buildParameterName(String, String) . |
String |
toString()
|
Methods inherited from class com.atlassian.confluence.core.ConfluenceEntityObject |
---|
getCreatorName, getLastModifierName, getRealClass, isPersistent, setCreatorName, setLastModifierName |
Methods inherited from class com.atlassian.core.bean.EntityObject |
---|
clone, getCreationDate, getCurrentDate, getId, getLastModificationDate, setClock, setCreationDate, setId, setLastModificationDate |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String FORM_PARAMETER_PREFIX
public static final String FORM_PARAMETER_SEPARATOR
public static final String FULL_FORM_PARAMETER_PREFIX
public static final String USE_CONFLUENCE_PERMISSION
public static final String UPDATE_USER_STATUS_PERMISSION
public static final String VIEW_USER_PROFILES_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 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
@Deprecated public static final String EXPORT_PAGE_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
Constructor Detail |
---|
public SpacePermission()
public SpacePermission(String type)
public SpacePermission(String type, Space space)
public SpacePermission(String type, Space space, String group)
@Deprecated public SpacePermission(String type, Space space, String group, String userName)
createUserSpacePermission(String, Space, String)
,
createGroupSpacePermission(String, Space, String)
public SpacePermission(SpacePermission spacePermission)
ConfluenceEntityObject
state.
spacePermission
- a spacePermission to replicate.Method Detail |
---|
public static SpacePermission fromFormParameterName(String formParameterName, Space space, String parameterType) throws ParseException
toFormParameterName(String)
.
formParameterName
- the form parameter name to convert to a space permissionspace
- the space the permission applies to, or null if it is a global permissionparameterType
- distinguishes the parameter from other parameters created with the same permission.
Makes little difference to this method.
ParseException
- if the form parameter name can not be converted to a permission typepublic Space getSpace()
public void setSpace(Space space)
public long getSpaceId()
public String getType()
public void setType(String type)
public String getGroup()
public void setGroup(String group)
public String getUserName()
public void setUserName(String userName)
public boolean isUserPermission()
public boolean isGroupPermission()
public boolean isAnonymousPermission()
public boolean isGlobalPermission()
public boolean isSpacePermission()
public String toString()
toString
in class Object
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()
public static Collection<SpacePermission> getDefaultGlobalPermissions()
SpacePermission
s.@Deprecated public String toFormParameterName(String parameterType)
PermissionRow.buildParameterName(String, String)
.
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.
@Deprecated public boolean isAdministrativePermission()
isAdministrativePermission
because CONFLUENCE_ADMINISTRATOR_PERMISSION
is
clearly an administrative permission, but not one that is required.
public boolean isGuardPermission()
public boolean isDependentOn(SpacePermission otherPermission)
otherPermission
- - permission to check against
public boolean isInvalidAnonymousPermission()
public static SpacePermission createAnonymousSpacePermission(String type, Space space)
public static SpacePermission createUserSpacePermission(String type, Space space, String userName)
public static SpacePermission createGroupSpacePermission(String type, Space space, String group)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |