obj objRef permission isGrantedToUser

Available for: Content Management Server

Task: Checks whether one of the groups of which the user is a member has been granted the specified permission to access the file concerned.

Syntax:

obj (withId objId) | (withPath path) | root permission permission isGrantedToUser login

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

Function parameters:

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

  • login specifies the login name of the user whose permission is checked.

Return value if successful: 1, if the user 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 \
isGrantedToUser jane
1