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

Fix: Autocomplete turned off for Staff #314

Merged
merged 14 commits into from
Apr 29, 2020
Merged

Conversation

andrewstec
Copy link
Contributor

Description: A staff user would attempt to add another staff user and experience a permissions error where an Autocomplete component would attempt to fetch user information that the staff role should not have access to. It rightly resulted in a back-end error being received by the user on the front-end UI.

Fix: Enable autocorrect for the admin user role, but only allow manual entries for the staff user role.

Original issue filed here: #305

@vercel
Copy link

vercel bot commented Mar 25, 2020

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/illinois/queue/tecrvxdpig
✅ Preview: In Progress

}

// We want to exclude existing staff from the autocompletion list
const filterBy = option => {
return props.existingStaff.findIndex(user => user === option.id) === -1
return props.existingStaff.findIndex(u => u === option.id) === -1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed because user already declared in upper scope.

Copy link
Collaborator

@jackieo5023 jackieo5023 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks so much for finding and fixing this bug!

@jackieo5023 jackieo5023 merged commit bdbf4a9 into illinois:master Apr 29, 2020
@andrewstec
Copy link
Contributor Author

Any time! Thanks for accepting the fix :)

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

Successfully merging this pull request may close these issues.

2 participants