-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
refactory: User Roles & Permissions | Access Control | Team Management #1980
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
base: canary
Are you sure you want to change the base?
refactory: User Roles & Permissions | Access Control | Team Management #1980
Conversation
Amazing creation, I really needed this! 🥹 Pls accepted this! 🙌 |
This needs more work, I haven't implemented this because it needs more work, it's not just changing the user role. Currently we use 1 or 2 functions which emphasize that there can only be one admin user in the whole system, so doing this would be wrong and lead to other problems. I think a better idea would be for the current admin to have a role called super-admin or something like that, and this would run on a manual sql migration. then from there in the system we would have 3 roles, super-admin, admin and user... That's one idea, or another idea could be to better integrate permissions and organization and roles based on better auth https://www.better-auth.com/docs/plugins/organization#create-roles |
current admin can be the owner then admin and users...
|
I get the point. I've actually seen myself in some cases where there were owner and admin in the same layer. And I hadn't understood why. Now you're explaining to me about 1~2 functions that should only have one administrator in the system, that makes sense. However, based on your idea of superadmin, admin and member. Wouldn't it be easier to just continue as owner, and refactor the part that has roles from only one system administrator to owner? I'm asking this without looking at the roles yet. I had also started the code that @vishalkadam47 had mentioned about "Add the ability to transfer ownership". However, I didn't go very deep. If you want, I can leave this in draft and start planning your ideas with the one @vishalkadam47 mentioned and I'll update it. |
Mini RoadmapUser Roles & Permissions
Refactoring/Add Access Control and more...
Team Management
Advanced Permissions & Access Control
|
I agree with the suggested changes Feel free to work whenever you want. |
@AlphaLawless Do you have any wip using better-auth, if yes please update this draft |
Hi! I'm I would like to apply some automated changes to this pull request, but it looks like I don't have the necessary permissions to do so. To get this pull request into a mergeable state, please do one of the following two things:
|
Add ability to edit user roles
Description
This PR adds the ability for organization owners to edit user roles (member, admin) through the UI.
Changes Made
Backend
updateRoleMember
mutation touserRouter
Frontend
AddInvitation
component (was missing from SelectContent)EditUserRole
component with role selection dialogFiles Changed
packages/server/src/routers/user.ts
- Added updateRoleMember mutationapps/dokploy/components/dashboard/settings/users/add-invitation.tsx
- Fixed admin role optionapps/dokploy/components/dashboard/settings/users/edit-user-role.tsx
- New componentapps/dokploy/components/dashboard/settings/users/show-users.tsx
- Integrated edit functionalitySecurity
Screenshots