coder / coder/internal

Implement notifications RBAC role

Đang mở
#2 2 bình luận 0 reaction 1 người được giao Được @dannykopping nhận Xem trên GitHub
project/notifications
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
3
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.