fortran-lang / registry

Registry for Fortran package manager
MIT License
8 stars 3 forks source link

feat: added apis to add/remove admins #29

Closed arteevraina closed 1 year ago

arteevraina commented 1 year ago

Registry users will be able to add other users as admins to a namespace which will enable them to have same authority as the original admin except the authority to remove admins. I have given that authority to original admin/author of the namespace for now. But of course, we can change that if there is a need.

Testable link - https://registry-frontend-arteevraina.vercel.app

minhqdao commented 1 year ago

Maybe we should give equal rights to all the admins and all is good.

arteevraina commented 1 year ago

Maybe we should give equal rights to all the admins and all is good.

Yes, I can ofcourse do that. But, I am afraid that then "added" admins will be able to remove "original" admin.

minhqdao commented 1 year ago

Then the original admin should think twice about which users to promote to admins. 😄

Let's say if the original admin stops being an admin, no one can remove admins anymore, which is also not optimal.

arteevraina commented 1 year ago

Then the original admin should think twice about which users to promote to admins. 😄

Alright, it should be fine then.

Let's say if the original admin stops being an admin, no one can remove admins anymore, which is also not optimal.

I agree.

minhqdao commented 1 year ago
Screenshot 2023-05-04 at 15 50 08

It works for me, but I think that the button should change from "Add" to "Remove" when the removal pop up is shown.

minhqdao commented 1 year ago

Then the original admin should think twice about which users to promote to admins. 😄

Let's say if the original admin stops being an admin, no one can remove admins anymore, which is also not optimal.

I thought about this again. Maybe we should have a role called a package owner. An owner should always have all the admin rights, which cannot be removed. So no matter if he/she gives admin rights to other users, his/her rights will still persist. What do you think? @arteevraina @henilp105 @perazz

arteevraina commented 1 year ago

Then the original admin should think twice about which users to promote to admins. 😄 Let's say if the original admin stops being an admin, no one can remove admins anymore, which is also not optimal.

I thought about this again. Maybe we should have a role called a package owner. An owner should always have all the admin rights, which cannot be removed. So no matter if he/she gives admin rights to other users, his/her rights will still persist. What do you think? @arteevraina @henilp105 @perazz

I think you are referring to namespace owners. Right ? 😅 Because in this context, we are dealing with namespace admins. But, yes that discussion can be extended to package owners as well.

Yes, I think we can have a check if someone tries to remove an admin who is a namespace owner and get the response as "Namespace owner cannot be removed".

minhqdao commented 1 year ago

Yes, I think that would be great. The uploader of a package or creator of a namespace should not be able to loose any of his/her rights.