Info |
---|
|
This feature is available starting with v1.1.0 of the Power Scripts™ for Confluence. Table plus |
---|
applyColStyleToCell | true |
---|
heading | 0 |
---|
columnTypes | s,s,s,s |
---|
multiple | false |
---|
columnAttributes | style="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold, |
---|
enableSorting | false |
---|
|
Syntax | addUserToContentPermission(permissionType, pageId, userNameOrKey) | Package | | Alias | | Pkg Usage | | |
Description
Excerpt |
Adds |
---|
|
Adds a single user to a content permission if the user is not already in that permission. |
Adds a single user to a content permission if the user is not already in that permission.
Parameters
Table plus |
---|
applyColStyleToCell | true |
---|
columnTypes | s,s,s,s |
---|
heading | 0 |
---|
multiple | false |
---|
enableSorting | false |
---|
|
Parameter name | Type | Required | Description |
---|
permissionType | |
...
String | Yes | Permission type a user will be added to. |
|
...
A list of values is provided in a table below. | pageId |
|
...
Number | Yes | The ID of the page to add permission to. | userNameOrKey |
|
...
String | Yes | User name or key of a user to add in |
|
...
...
Return
...
Type
boolean Boolean (true/false)
Returns true if the content permission was actually changed by the routine invocation, that is a user was actually added to the specified content permission.
Returns false if a content permission was not changed.
Note |
---|
If the routine returns false, it doesn't mean that a user doesn't have the specified permission. It just means that the state of the content permission was not changed. For example, if the specified user was in the specified content permission before the routine invocation, the routine will return false, because the state of the content permission was not changed. In order to check if the specified user has a certain content permission please use the following routine: userHasContentPermission . |
Example
Allows the "jdoe" user to modify page with the 11508 ID.
...
Example
Code Block |
---|
|
addUserToContentPermission("Edit", 11508, "jdoe"); |
...
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 25 |
---|
showSpace | false |
---|
cql | label = "psuser_conf"routines" and space = currentSpace ( ) |
---|
labels | jiraarray_comment_routineroutines |
---|
|