Skip to main content
Version: 2.0.0

Condition Set Rules

A condition set rule is a logical expression that combines a User Set, Resource Set and an Action.

In this particular example, the action that is going to be performed will be on a repository, and we will want users to clone it.

reminder

Let's remind ourselves of the sets and actions we will be dealing with.

User Set - us_based_employees
Action - repository:clone
Resource Set - private_repos

We can now go ahead and assign the rule via the API. With this set we define the following rule:

rule

Employees located in the US have the permissions to clone private repositories.

{
"user_set": "us_based_employees",
"permissions": [
"repository:clone"
],
"resource_set": "private_repos"
}