Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit753e3e2

Browse files
committed
make fmt
1 parentb0e8280 commit753e3e2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

‎coderd/rbac/USAGE.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ These can be found in `coderd/rbac/roles.go`.
3131
|**orgUserAdmin**| Like**userAdmin**, but scoped to a single organization|_(org-level equivalent)_|
3232
|**orgTemplateAdmin**| Like**templateAdmin**, but scoped to a single organization|_(org-level equivalent)_|
3333

34-
**Note an example resource indicates the role has at least 1 permission related to the resource. Not that the role has complete CRUD access to the resource.**
34+
**Note an example resource indicates the role has at least 1 permission related
35+
to the resource. Not that the role has complete CRUD access to the resource.**
3536

3637
_\* except some, which are not important to this overview_
3738

@@ -137,8 +138,8 @@ In our case, we want **members** to be able to CRUD their own frobulators and we
137138
want**owners** to CRUD all members' frobulators. This is how most resources
138139
work, and the RBAC system is setup for this by default.
139140

140-
However, let's say we want**organization auditors** to have read-only access to all organization's
141-
frobulators; we need to add it to`coderd/rbac/roles.go`:
141+
However, let's say we want**organization auditors** to have read-only access to
142+
all organization'sfrobulators; we need to add it to`coderd/rbac/roles.go`:
142143

143144
```go
144145
funcReloadBuiltinRoles(opts *RoleOptions) {
@@ -304,6 +305,7 @@ func (q *querier) GetUserFrobulators(ctx context.Context, userID uuid.UUID) ([]d
304305
return fetch(q.log, q.auth, q.db.GetUserFrobulators)(ctx, id)
305306
}
306307
...
308+
```
307309

308310
This states that the`policy.ActionRead` permission is required in this query on
309311
the`ResourceFrobulator` resources, and`WithOwner(userID.String())` specifies

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp