Daniel Daugherty
Daniel Daugherty

Reputation: 1

Artifactory user privileges

Is there a way to check if a user has deploy permissions via the Artifactory REST API?

I am sending requests to the Artifactory server using cURL.

Upvotes: 0

Views: 328

Answers (1)

Scott
Scott

Reputation: 136

Yes, use the /api/storage/{repo-key}/{item}?permissions API. See the docs at https://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API#ArtifactoryRESTAPI-EffectiveItemPermissions

The docs explain the meaning of the permission chars.

GET /api/storage/libs-release-local/org/acme?permissions
{
"uri": "http://localhost:8081/artifactory/api/storage/libs-release-local/org/acme"
"principals": {
        "users" : {
          "bob": ["r","w","m"],
          "alice" : ["d","w","n", "r"]
        },
        "groups" : {
          "dev-leads" : ["m","r","n"],
          "readers" : ["r"]
        }
    }
}

Upvotes: 1

Related Questions