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

About user_role =[:admin, :student] #1

Open
emclab opened this issue Dec 9, 2011 · 1 comment
Open

About user_role =[:admin, :student] #1

emclab opened this issue Dec 9, 2011 · 1 comment

Comments

@emclab
Copy link

emclab commented Dec 9, 2011

Hi I have been puzzled with a question about where and how you can define a user as :admin or :student. It may be obvious. But I just did not find where it is. Thanks.

@jalagrange
Copy link
Owner

Hello, I currently use "declarative authorization" gem. One of the main characteristics of this gem is that all my users have different roles. As such, it has a function called role_symbols which returns an array of symbols for the user in question. For example:
myuser.role_symbols
would return
[:admin, :student, :student_delegate]

I hope this clears the issue, thanks for your interest!

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