Create Permission if not exists in HasPermission Trait #2030
marvin-wtt
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
Maybe it could be a breaking change |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When using wildcard permissions with the scheme
{resource}.{action}.{target}
, I'd find it more handy if the permission would be created automatically withPermission#findOrCreate
instead of trowing an exception if the permission for the target does not exist yet. This allows the assignment of permissions directly, without having to check wherever it exists first. This makes it more intuitive in my opinion.It could be combined with the config entry
enable_wildcard_permission
.Before creating a PR for this minor change, I'd like to hear some other opinions on this.
Beta Was this translation helpful? Give feedback.
All reactions