I currently use devise and cancan for authorization/authentication. I want to give select users access to certain features and hide them to others.
What is the best practice for doing this with my current login stack?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
My current solution is to add another cancan role, and call has_role? to determine the logic. This situation requires the user to have two roles.
Is this fine or is there a ‘lighter’ way of doing it?