illinois / queue

A microservice queue for holding open office hours
University of Illinois/NCSA Open Source License
82 stars 37 forks source link

Manage Staff broken for course staff not also admin #305

Closed winstan closed 4 years ago

winstan commented 4 years ago

Course staff who are not also queue administrators cannot add new staff to their course due to autocomplete. The 'Add staff' button is disabled unless autocomplete returns a pendingUser, and autocomplete only works for admins. See https://github.com/illinois/queue/blob/master/src/components/AddStaff.js This issue was introduced in https://github.com/illinois/queue/commit/e4d8704bb8c25473071a8e9ae1ebe98a97c735ee or #288

How about disabling autocomplete for non-admins? Is that relatively simple? Forcing non-admins to know the full ID of a person they are adding is reasonable, I think.

andrewstec commented 4 years ago

Issue being resolved here: ubccpsctech#2

It will be tested on our downstream fork in our production environment. Please let us know if this logic looks reasonable on your end.

We avoided gutting out the AsyncTypeahead component and turned off the form for the staff user. Turning off the feature stopped the permissions error that the staff was seeing on the front-end. Staff now have to manually add a user by their full UID (user@xyz.ca), etc.

andrewstec commented 4 years ago

Created PR to Illinois fork here: https://github.com/illinois/queue/pull/314

andrewstec commented 4 years ago

https://github.com/illinois/queue/pull/314

@winstan

The fix was merged last night. We can likely close this issue.

winstan commented 4 years ago

I've tested using illinois/queue/master, and it's working now. :)