isallowed

check if user/group can access a stream or execute a specific command in a stream

Usage

accurev isallowed [ -u <principal> ] [ -s <stream> ] [ -p <depot> ] [ -c <command> ]

Description

The isallowed command determines whether an AccuRev user or group is allowed to access a stream. It displays 1 if the specified user or group is allowed to access the specified stream, and 0 otherwise.

Note: the command’s return value is 0 in either case.

If the -c option (available in AccuRev versions 7.6 and higher) is supplied, isallowed determines whether the user/group is allowed to execute the specified command in the stream.

Options

-u

The name or ID of an AccuRev user or group whose access rights will be checked. Defaults to the current user.

-s

The name or ID of a stream.

Defaults to the workspace containing the current working directory if neither -s nor -p is specified.

-p

The name or ID of a depot. Required if the -s option specifies a stream ID.
-c

Available in AccuRev versions 7.6 and higher

The name of an AccuRev admin command. Valid values are listed in the Command Permissions tab in the AccuRev GUI’s ‘Admin | Security’ view. A command that contains a space must be enclosed in double quotes.

Examples

  • Is AccuRev user john allowed to access stream apollo13?

    > accurev isallowed -u john -s apollo13 
    1
  • Is AccuRev user mjones allowed to execute “setproperty stream” in stream 353 of depot 28?

    > accurev isallowed -u mjones -s 353 -p 28 -c “setproperty stream”
    0

See Also

  • show (allowed),   show (denied)