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

Allow admins to edit school and major of users #1662

Merged
merged 3 commits into from
Dec 2, 2022
Merged

Conversation

damianhxy
Copy link
Member

Description

  • Disable school and major fields on the edit user form for non-admins
  • Allow admins to update school and major fields

Motivation and Context

Currently, the school and major fields on the edit user form appear editable, but in reality can be edited neither by users nor admins.

This PR allows admins to update the fields. However, in the interest of preserving integrity of the data, we disable the fields for users.

Fixes #1659

How Has This Been Tested?

  • As an admin, update school and major fields successfully for yourself and other users
  • As a normal user, fields are disabled for you, and you can't update them (even if you removed the disabled attribute)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist:

  • I have run rubocop for style check. If you haven't, run overcommit --install && overcommit --sign to use pre-commit hook for linting

@damianhxy damianhxy changed the title Allow admins to edit school and major, but not users Allow admins to edit school and major of users Dec 2, 2022
Copy link
Contributor

@20wildmanj 20wildmanj left a comment

Choose a reason for hiding this comment

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

Verified admins are now able to edit school and major of users, and students have the fields now greyed out. LGTM

@damianhxy damianhxy merged commit bb225b4 into master Dec 2, 2022
@damianhxy damianhxy deleted the fix-user-edit-form branch December 2, 2022 14:12
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.

Editing User's "School" and "Major" fields doesn't get saved
2 participants