addGroupToSpacePermission(permissionType, spaceKey, groupName)
Adds a given group to a space permission if the group is not in that permission already.
|Yes||Permission type a group will be added to. |
A list of values is provided in a table below.
|Yes||The key of the space to add permission to.|
The name of a group to add in permission.
Valid space permission types
|Permission to use Confluence.|
|Permission to limited usage of Confluence.|
|Permission to update user status.|
|Permission to view user profiles.|
|Permission to be a system administrator.|
|Permission to be a Confluence administrator.|
|Permission to work with personal space.|
|Permission to create a space.|
|Permission to view a space.|
|Permission to remove own content.|
|Permission to add comments.|
|Permission to edit a space.|
|Permission to update space permissions.|
|Permission to remove a page.|
|Permission to remove a comment.|
|Permission to remove a blog.|
|Permission to create an attachment.|
|Permission to remove an attachment.|
|Permission to edit a blog.|
|Permission to export a space.|
|Permission to remove email.|
|Permission to update page permissions|
|Permission to work with profile attachments.|
Returns true if space permission was actually changed by the routine invocation, i.e. a group was actually added to the specified space permission. Returns false if a space permission was not changed.
If the routine returns false, it doesn't mean that a group doesn't have the specified permission. It just means that the state of the space permission was not changed. For example, if the specified group was in the specified space permission before the routine invocation, the routine will return false, because the state of the space permission was not changed. In order to check if the specified group has a certain space permission please use the following routine:
addGroupToSpacePermission("EDITSPACE", "PS-DOCS", "confluence-users");
Allows members of the group "confluence-users" to modify space with key "PS-DOCS".