Skip to content

Conversation

kinclay
Copy link

@kinclay kinclay commented Feb 28, 2025

Update readme to match template.

Signed-off-by: Clay King [email protected]

Update readme to match template.

Signed-off-by: Clay King <[email protected]>
Copy link
Contributor

@cdisselkoen cdisselkoen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, some small issues

# GitHub Model

In this example, we show how you can implement GitHub's repository permission access in Cedar. There are three “views” of GitHub permissions, corresponding to *Personal*, *Organization* and *Enterprise* accounts. We’ll focus on the *Organizational* view. Our model won’t be complete since this is a tutorial. We’ll aim for a subset of features that you are probably familiar with.
In this example, GitHub's repository permissions are implemented. .
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra . here

Comment on lines +38 to +51
### `pull`
Pull a repository.

### `push`
Push a repository.

### `fork`
Fork a repository.

### `add_{reader, triager, writer, maintainer, admin}`
Add a user to the specified role of a repository.

### `{create, delete, assign}_issue`
Perform the specified operation on an issue.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure we should be using subsections in this case. It doesn't match what we do in the rest of the document (e.g., with entity types) and the description is too short for a subsection.

#### Action for Writers:

A `User` of role `Writer` should be able to push to a repository and also edits its issues.
`User` entities with a role of `Writer` should be able to push to a repository and also edits its issues.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`User` entities with a role of `Writer` should be able to push to a repository and also edits its issues.
`User` entities with a role of `Writer` should be able to push to a repository and also edit their issues.

* The 1 `Organization` entity, `tiny_corp_owners`, has admin priveleges to all 3 repositories.
* The 1 `Team` entity, `team_that_can_read_everything`, has read priveleges to all 3 repositories.

Here are some authz requests to test, included in the `ALLOW` and `DENY` folders:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why abbreviate here?

Suggested change
Here are some authz requests to test, included in the `ALLOW` and `DENY` folders:
Here are some authorization requests to test, included in the `ALLOW` and `DENY` folders:

* The 1 `Team` entity, `team_that_can_read_everything`, has read priveleges to all 3 repositories.

Here are some authz requests to test, included in the `ALLOW` and `DENY` folders:
* Alice tries to pull common_knowledge: ALLOW because she has read permissions through the `common_knowledge_writers` user group.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you're using the name with an underscore, I'd use backticks - so either

Suggested change
* Alice tries to pull common_knowledge: ALLOW because she has read permissions through the `common_knowledge_writers` user group.
* Alice tries to pull common knowledge: ALLOW because she has read permissions through the `common_knowledge_writers` user group.

or

Suggested change
* Alice tries to pull common_knowledge: ALLOW because she has read permissions through the `common_knowledge_writers` user group.
* Alice tries to pull `common_knowledge`: ALLOW because she has read permissions through the `common_knowledge_writers` user group.

Same comments goes for the next two cases (with uncommon_knowledge).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants