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

Question: should permissions be deletable? #21

Closed
tiagof opened this issue Aug 29, 2022 · 2 comments
Closed

Question: should permissions be deletable? #21

tiagof opened this issue Aug 29, 2022 · 2 comments

Comments

@tiagof
Copy link
Contributor

tiagof commented Aug 29, 2022

Hi, this is kinda of a conceptual question:
Currently permissions can be delete (Via the relationship table in the Roles' edit page).
Should be allowed?

The point is that when checking if a user has a particular permission, an exception is thrown if that permission does not exist. So deleting permissions is not really recommended

In addition, when considering roles, maybe they should not be deletable if assigned to at least 1 role... ?

Thanks.

ps: Happy to provide PRs to tackle this if it makes sense.

@phpsa
Copy link
Owner

phpsa commented Aug 30, 2022

Hi,

Does make sence, I did originally build this in as 2 of my projects using this had to tackle roles differently,
Happy for you to look further into it. -- that said - how I generally deal with it in my projects would be the same as I do anywhere else - making use of a Policy to return whether or not we are allowed.

@tiagof
Copy link
Contributor Author

tiagof commented Aug 31, 2022

Hi,

you're right. There's really nothing to tackle. Just used policies and it is solved (still getting used to how filament manages all this).

Thanks !

@tiagof tiagof closed this as completed Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants