usememos / memos

An open-source, lightweight note-taking solution. The pain-less way to create your meaningful notes. Your Notes, Your Way.
https://usememos.com
MIT License
34.06k stars 2.47k forks source link

Add roles/permissions feature to allow for custom access based on roles/groups. #3334

Closed PylotLight closed 5 months ago

PylotLight commented 6 months ago

Describe the solution you'd like

Users should be assigned roles/groups which allows certain access. This would cover multiple other issues mentioned here so this issue would be the overarching project/issue to add in the capability for granular permissions for users.

Type of feature

User Interface (UI) + API

Additional context

Example roles: Admin: User Guest/Anonymous Custom

Permissions: Notes - Create, Read, Update, Delete Users - Create, Read, Update, Delete Comments - Create, Read, Update, Delete Sharing - Create shared links Export/Import - Allow/Deny etc... for all other permissions.

Potentially relevant libraries/docs: https://pkg.go.dev/os/user https://github.com/Permify/go-role/ https://github.com/casbin/casbin https://github.com/mikespook/gorbac https://mikebolshakov.medium.com/custom-role-based-authorization-in-golang-ba6d5585a521 https://github.com/qor/roles

PylotLight commented 6 months ago

Other issues that might be addressed by this issue: https://github.com/usememos/memos/issues/3217 https://github.com/usememos/memos/issues/3260