You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, thanks for making this gem, for the most part it does what I need :)
I've just started using rolify and have read the documentation, I'm not finding some of it very intuitive tbh.
The create_role does what I'd expect, but add_role which I would have thought should be named assign_role creates a new role if the role does not exist. This feels wrong to me, I'd expect an error telling me that the role does not exist and only allow me to assign roles that have previously been defined.
It's also strange that roles are automatically deleted when not currently being used, but at least there is a config to fix that even though I think the default should be false.
I'm sure there must be a use case for the auto creation of the role but it feels wrong that this is the default behaviour, can we please at least have a config like the config.remove_role_if_empty = false maybe something like config.skip_create_role = true that stops roles from being created with add_role.
Thanks,
Lee.
The text was updated successfully, but these errors were encountered:
First, thanks for making this gem, for the most part it does what I need :)
I've just started using rolify and have read the documentation, I'm not finding some of it very intuitive tbh.
The create_role does what I'd expect, but add_role which I would have thought should be named assign_role creates a new role if the role does not exist. This feels wrong to me, I'd expect an error telling me that the role does not exist and only allow me to assign roles that have previously been defined.
It's also strange that roles are automatically deleted when not currently being used, but at least there is a config to fix that even though I think the default should be false.
I'm sure there must be a use case for the auto creation of the role but it feels wrong that this is the default behaviour, can we please at least have a config like the
config.remove_role_if_empty = false
maybe something likeconfig.skip_create_role = true
that stops roles from being created with add_role.Thanks,
Lee.
The text was updated successfully, but these errors were encountered: