coder / coder/internal

Implement notifications RBAC role

オープン
#2 コメント 2 件 リアクション 0 件 担当者 1 名 @dannykopping が担当を希望しています GitHub で見る
project/notifications
主要言語
言語のデータがありません
スター
3
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

説明

There are a number of TODOs in the `notifications` package around RBAC.

@Emyrk gave us some pointers on how to implement this:

> Add a new resource like template here: https://github.com/coder/coder/blob/769ac83729fb642d61538f871889d5161e0136fa/coderd/rbac/policy/policy.go#L130-L139
It will autogen in some files.
Copy this RBACObject from File pretty much exactly:
https://github.com/coder/coder/blob/769ac83729fb642d61538f871889d5161e0136fa/coderd/database/modelmethods.go#L208-L212

---

> With those 2 things, the rbac should just work. As all users by default get allPermsExcept() here: https://github.com/coder/coder/blob/769ac83729fb642d61538f871889d5161e0136fa/coderd/rbac/roles.go#L246-L246
So the notificaton resource will be appended automatically. The WithOwner() scopes the resource to the user

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。