instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.57k stars 2.48k forks source link

Missing +People within Course for site admin user #2214

Closed brandonfranzke closed 1 year ago

brandonfranzke commented 1 year ago

Summary:

Identical issue: https://github.com/instructure/canvas-lms/issues/2128 (see figure for my exact issue):

Using master account to view People page, the "+People" button has gone. No errors show in control panel of google chrome. Tried to add a teacher into the course, cannot see it, too.

Posted a follow-up since OP marked resolved but no response.

Additional notes:

I attempted a new postgres DB with a "fresh" environment (rake db:initial_setup). I create a dummy course and check with admin user and can see the "+People". I flushall redis, update database.yml, and restart the server and the "+People" button disappears. I assume it is related to some permission check that is failing. I dont know if its helps but during debug I log every call to "can_do" helper. For the "fresh" install with admin viewing Course > People is see:

canvas-web  | [910cae2d3a367fa6e5fca43688cda833 4ea538b3-b484-4cf7-a47d-80313976c7ae] can_do, , 1, [:create]
canvas-web  | [910cae2d3a367fa6e5fca43688cda833 4ea538b3-b484-4cf7-a47d-80313976c7ae] can_do, 1, 1, [:manage_students]
canvas-web  | [910cae2d3a367fa6e5fca43688cda833 4ea538b3-b484-4cf7-a47d-80313976c7ae] can_do, 1, 1, [:read_roster]
canvas-web  | [910cae2d3a367fa6e5fca43688cda833 4ea538b3-b484-4cf7-a47d-80313976c7ae] can_do, 1, 1, [false]
canvas-web  | [910cae2d3a367fa6e5fca43688cda833 4ea538b3-b484-4cf7-a47d-80313976c7ae] can_do, 1, 1, [:manage_admin_users, :manage_students, :read_prior_roster]
canvas-web  | [910cae2d3a367fa6e5fca43688cda833 4ea538b3-b484-4cf7-a47d-80313976c7ae] can_do, 1, 1, [:read_reports]
canvas-web  | [910cae2d3a367fa6e5fca43688cda833 4ea538b3-b484-4cf7-a47d-80313976c7ae] can_do, 1, 1, [:view_all_grades]
canvas-web  | [910cae2d3a367fa6e5fca43688cda833 4ea538b3-b484-4cf7-a47d-80313976c7ae] can_do, 1, 1, [:read_roster]
canvas-web  | [910cae2d3a367fa6e5fca43688cda833 4ea538b3-b484-4cf7-a47d-80313976c7ae] can_do, 1, 1, [:manage]
canvas-web  | [910cae2d3a367fa6e5fca43688cda833 4ea538b3-b484-4cf7-a47d-80313976c7ae] can_do, 1, 1, [:use_student_view]
canvas-web  | [910cae2d3a367fa6e5fca43688cda833 4ea538b3-b484-4cf7-a47d-80313976c7ae] can_do, 1, 1, [:use_student_view]

after swapping db, flushing cache, and restarting I see only:

canvas-web  | [19988d0bdc988193f2c6f79b780464e3 564da12d-8f08-40fe-bbed-1476bff7259c] can_do, , 1, [:create]
canvas-web  | [19988d0bdc988193f2c6f79b780464e3 564da12d-8f08-40fe-bbed-1476bff7259c] can_do, 1, 1, [:use_student_view]
canvas-web  | [19988d0bdc988193f2c6f79b780464e3 564da12d-8f08-40fe-bbed-1476bff7259c] can_do, 1, 1, [:use_student_view]

So it seems that there are some conditionals to get to :manage_students check that are not happening. This would explain the missing HTML elements, but I have not been able to track down on server side.

Aside: Any chance this is related to "granular" permissions feature? The break was sudden but unnoticed for several weeks (presumed) and those were the last option I recall adjusting.

marialujanGA commented 1 year ago

I had the exact same problem, plus I was unable to see the people inside a course, kept getting an error message. Changing the People Page Upgrade option in Settings > Feature Options solved it for me. Canvas error solution

brandonfranzke commented 1 year ago

Fantastic!! Solved.

omarpr commented 1 year ago

@brandonfranzke Was this feature flag turned on for you or it was off?

brandonfranzke commented 1 year ago

It was turned ON. I turned off, flushed redis cache / restarted container and all UI elements show. (not sure if latter was required, but non-destructive).

omarpr commented 1 year ago

Sounds good. Thanks for the info!