addGroupToContentPermission
Description
Adds a selected group to a content permission (usually to a page permission) if the group is not in that permission already.
Parameters
Return Type
Boolean (true/false)
Returns true if content permission was actually changed by the routine invocation, i.e. a group was actually added to the specified content permission. Returns false if a content permission was not changed.
Example
Allows members of the group "confluence-users" to modify page with id 11508.
addGroupToContentPermission("Edit", 11508, "confluence-users");
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 content permission was not changed. For example, if the specified group 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 group has a certain content permission please use the following routine: groupHasContentPermission.