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

Add method only_has_role? and only_witth_role #424

Open
westonganger opened this issue Nov 7, 2016 · 0 comments

Comments

Projects
None yet
2 participants
@westonganger
Copy link

commented Nov 7, 2016

It would be nice to have a method to check if the resource has only one specific role. For example:

current_user.only_has_role?(:guest)

In addition to this it may be beneficial to include a only_with_role finder method. For example:

User.only_with_role(:guest)

@westonganger westonganger changed the title Add method `only_has_role?` Add method only_has_role? and only_witth_role Nov 7, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.