Skip to content

chore: document RBAC usage #14065

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Sep 10, 2024
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Cian Johnston <cian@coder.com>
  • Loading branch information
dannykopping and johnstcn authored Sep 10, 2024
commit 5fa2b96bc12fe7ca5a41c772871eb585a3a0718d
2 changes: 1 addition & 1 deletion coderd/rbac/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ This can be represented by the following truth table, where Y represents _positi
- `object` is any valid resource type.
- `id` is any valid UUID v4.
- `id` is included in the permission syntax, however only scopes may use `id` to specify a specific object.
- `action` is `create`, `read`, `modify`, `delete`, or another verb.
- `action` is typically `create`, `read`, `modify`, `delete`, but you can define other verbs as needed.

## Example Permissions

Expand Down
4 changes: 2 additions & 2 deletions coderd/rbac/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Let's now add our frobulator noun to `coderd/rbac/policy/policy.go`:
...
```

Entries in the `frobulators` table be created/read/updated/deleted, so we define
We need to create/read/update/delete rows in the `frobulators` table, so we define
those actions.

`policy.go` is used to generate code in `coderd/rbac/object_gen.go`, and we can
Expand Down Expand Up @@ -288,7 +288,7 @@ FAIL
This shows you that the `org_auditor` role has `read` permissions on the
frobulator, but no test case covered it.

**NOTE: don't just add cases which make the tests pass; consider all the way in
**NOTE: don't just add cases which make the tests pass; consider all the ways in
which your resource must be used, and test all of those scenarios!**

# Database authorization
Expand Down
Loading