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

[BUG] Cannot login as supervisor user #176

Closed
lisavogtsf opened this issue Apr 25, 2020 · 1 comment
Closed

[BUG] Cannot login as supervisor user #176

lisavogtsf opened this issue Apr 25, 2020 · 1 comment
Labels
📋 Supervisor Work relating to the case supervisor role 🙅‍♂️ User Permissions Work relating to different user permissions Priority: Low Type: Bug
Milestone

Comments

@lisavogtsf
Copy link
Collaborator

lisavogtsf commented Apr 25, 2020

What's the bug?
Attempting to login as the seeded "supervisor user," email: supervisor1@example.com, gets an "unrecognized role" error.

Need to set up proper scope for a supervisor user in devise policies/scope--what permissions apply to this user?
Supervisors can only access data associated with the following

  • volunteers assigned to them, regardless of case assignment status (view and edit)
  • case_contacts associated with a supervisor's volunteer assignments (view and edit)
  • casa_cases associated with a supervisor's volunteer assignments (view and edit)
  • volunteer and case assignments (view and edit)
  • generate reports (need more details)

Need to add a test to ensure this doesn't happen in the future.

How to make it happen
Steps to reproduce the behavior:

  1. As a logged out user
  2. Go to the home page/login page
  3. Enter valid email and password from db seed.rb file
  4. See runtime error: unrecognized role (screenshot below)

Screenshots
Screen Shot 2020-04-25 at 1 34 55 PM

Extra info:
Error cites user_policy.rb line 25, that file only recognizes 'casa_admin' and 'volunteer' as valid roles

relates to issues
#30

@Zrrrpy Zrrrpy added 📋 Supervisor Work relating to the case supervisor role Type: Bug 🙅‍♂️ User Permissions Work relating to different user permissions Status: Available Priority: Low labels Apr 25, 2020
@Zrrrpy Zrrrpy added this to the 2020 Post MVP milestone Apr 26, 2020
@compwron compwron moved this from To do to Done in CASA Volunteer Portal May 7, 2020
@Zrrrpy
Copy link
Collaborator

Zrrrpy commented May 10, 2020

@compwron has this fix pushed to staging? I'm still getting an error when I try to log in as a supervisor using supervisor1@example.com

@pollygee pollygee closed this as completed Oct 1, 2020
CASA Volunteer Portal automation moved this from Done (in staging or deferred) to Merged to QA Oct 1, 2020
@Zrrrpy Zrrrpy moved this from Merged to QA to Done (in staging or deferred) in CASA Volunteer Portal Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📋 Supervisor Work relating to the case supervisor role 🙅‍♂️ User Permissions Work relating to different user permissions Priority: Low Type: Bug
Projects
CASA Volunteer Portal
Done (in prod!)
Development

No branches or pull requests

3 participants