Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 CLI Reference | 2025.1

# p4 revoke-permission (graph)

Remove from a user or group access to a depot of type `graph` or to a repo.

For depots of type `graph` only.

## Syntax

    p4 [g-opts] revoke-permission -d graphDepot1 -g group [-r ref] -p permission
    p4 [g-opts] revoke-permission -d graphDepot1 -u user [-r ref] -p permission
    p4 [g-opts] revoke-permission -n //graphDepot1/reponame -g group [-r ref] -p permission
    p4 [g-opts] revoke-permission -n //graphDepot1/reponame -u user [-r ref] -p permission
    p4 [g-opts] revoke-permission -n //graphDepot1/reponame -g group -r ref -p restricted-ref
    p4 [g-opts] revoke-permission -n //graphDepot1/reponame -u user -r ref -p restricted-ref

Syntax conventions

## Description

An administrator is the owner, or a user that has been granted the `admin` permission for that specific graph depot or repo.

After the administrator has granted a permission to a user or group for a depot of type `graph` or a repo, the administrator can remove that permission with the `revoke-permission` command. The administrator specifies the group or user that will no longer have the specified permission to the specified depot of type `graph` or repo.

An administrator is the `owner`, or a user that has been granted the `admin` permission for that specific graph depot or repo.

Certain permissions imply (implicitly include) other permissions. An implied permission cannot be revoked directly. See the section for Permissions in the `p4 grant-permission` topic.

## Options

`-d` | Applies at the level of the depot, and therefore includes all of its repos.
`-n` | Applies to the repo with the specified name.
`-g` | Applies to the specified group.
`-u` | Applies to the specified user.
`-r` | Applies to the specified branch or tag. Required for the `restricted-ref` permission, but otherwise optional.
`-p` | Applies to the specified permission.
`g-opts` | See Global options.

## Examples

To remove from user bruno the ability to `read` the files in the specified depot of type graph, which also prevents that user from making a Git clone:

    p4 revoke-permission -n //graphDepot1/repo8 -u bruno -p read

To remove from user `bruno` the ability to create a Git reference to a release tag in the specified depot of type `graph`.

    p4 revoke-permission -d graphDepot1 -u bruno -r refs/head/rel-* -p create-ref

p4 revoke-permission can use the `-r` option with additional permissions: `delete-ref`, `write-ref`, `force-push`, `write-all`, and `restrict-ref`. To remove from the `devops` group the ability to update the specified branch:

    p4 revoke-permission -n //repo/test -g devops -p restricted-ref -r refs/heads/branchName

## Usage notes

Can File Arguments Use Revision Specifier? | Can File Arguments Use Revision Range? | Minimal Access Level Required
--- | --- | ---
N/A | N/A | `super`, or admin of this repo see p4 revoke-permission (graph)

## Related commands

To assign a permission | `p4 grant-permission`
To list the permissions currently granted | `p4 show-permission`

Your search for returned results