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

Store client-side role-permissions in one place. #1118

Open
IanMayo opened this issue May 22, 2024 · 0 comments
Open

Store client-side role-permissions in one place. #1118

IanMayo opened this issue May 22, 2024 · 0 comments
Labels
enhancement New feature or request technical debt

Comments

@IanMayo
Copy link
Contributor

IanMayo commented May 22, 2024

Soul is now protecting tables using permissions for roles.

A couple of issues have demonstrated that this is working effectively.

But, while that is valid, we use roles to decide which actions to offer to the user, either by using the role-string or the id of the role.

This logic is spread across VAL. It would be easier to audit/verify if these were in one place.

We have a rolesThatCanEditPassword const in UserShow. It contains an array of role names that can do the operation described in the constant name.

We should follow this practice across all of VAL, centralising them in a file called clientPermissions. Note: we should use const values for role-value, not strings.

@IanMayo IanMayo added enhancement New feature or request technical debt labels May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request technical debt
Projects
None yet
Development

No branches or pull requests

1 participant