Skip to content
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

GUI Permission Editor #1139

Open
discomrade opened this issue Apr 26, 2024 · 3 comments · May be fixed by #1149
Open

GUI Permission Editor #1139

discomrade opened this issue Apr 26, 2024 · 3 comments · May be fixed by #1149
Labels

Comments

@discomrade
Copy link
Contributor

Making a proper feature request for this suggestion:

at some point I'd love to have a GUI permission editor, which might work as a form of documentation so one can see the effects of enabling or disabling each flag 🤔

Describe the solution you'd like
A config page where the permissions of each role can be configured by administrators using checkboxes.

Special roles like admin should have their permissions visible with checkboxes greyed out. If a role has a parent role, this should be added using a dropdown box, so the user understands which parent role must be edited to remove an inherited permission, or can change the parent role.

In the future, this should be able to add new roles or delete unused roles.

@discomrade
Copy link
Contributor Author

I've made a draft GUI editor. This involves moving the permissions to the database instead of being hardcoded or in a config file, which also requires moving UserClass code to an extension (so the database can load first).

There are a few code issues marked by TODO comments, the main one being some confusion over how to properly use boolean fields in the database.

main...discomrade:shimmie2:permissions

image

image

image

@shish
Copy link
Owner

shish commented May 7, 2024

This involves moving the permissions to the database instead of being hardcoded or in a config file

I wonder why this was in a config file in the first place, since being in the database certainly feels like a better idea... my gut is telling me that there was a reason, but I can't remember it 😅 If it's in the database in your branch, and everything is working fine there, maybe the reason disappeared at some point over the past few years...

@discomrade
Copy link
Contributor Author

It could have been because the database code loads after core code. Everything seems to be working alright so hopefully the reason disappeared :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants