obj objRef permission isGrantedToGroup

Available for: Content Management Server

Task: Checks whether the specified group has the specified permission for a CMS file.

Additional information: The members of the group always have all file-related permissions if they have the permissionRoot permission or are superusers, even if other file-related permissions have not been granted to them.

Syntax:

obj (withId objId) | (withPath path) | root permission permission isGrantedToGroup group

Function parameters:

  • permission specifies the permission to be checked. The validPermissions file parameter returns the names of the existing permissions.

  • group specifies the name of the group which is tested for having the specified permission.

Return value if successful: 1, if the group has the permission, otherwise 0 (bool).

Necessary permissions (CM only): The user must have the permissionRead permission for the specified file.

Example:

CM>obj withId 41735 permission permissionCreateChildren \
isGrantedToGroup editors
1