-
Notifications
You must be signed in to change notification settings - Fork 111
feat: add affiliation attribute to user #4113
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
base: main
Are you sure you want to change the base?
Conversation
|
@jaeyun0503 Could you please move the field to the already existing modal of |
I think this is a design question whether to use affiliation for one of the two purposes:
If option 1, then we should go with your implementation so that every time when a new user comes into our system, the admin user can see their affiliation to decide whether to approve or not. If we choose option 2, then I think my implementation works fine since the affiliation part is collected once people are approved into the system. I think we should ask Professor Li to see which option seems better for our system. |
|
My general thought is that each user can provide their affiliation optionally, as some of them prefer not to provide such information. If the design is still not clear, we can do a short meeting and report the decision here. |
That aligns with my current design where users can optionally enter the affiliation at the very first time they log into the system. I think this PR is good for review. |
|
@aicam Please review it. |
aicam
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My biggest concern currently is the new field in User type, most of file changes in this PR are due to adding redundant null to all User objects
What changes were proposed in this PR?
Summary
To gather more user information for a better overview of users, this PR introduces a new column
affiliationto theusertable. Now when a user logins to the Texera for the first time (after getting approved to REGULAR role), they will be prompted to enter their affiliation. The answer will be recorded to the database and retrieved when admins enter the admin dashboard.For Developers
Please do the following steps to incorporate with new changes:
Sample Video
Screen.Recording.2025-12-08.at.00.10.17.mov
Design of the Feature
When a user logins to the system for the first time, they will be prompted to enter their affiliation after getting approved to REGULAR role. The user can submit their affiliation and the frontend would send this information to the backend to save in the database. Users can choose to either enter the affiliation or skip the prompt and the system would remember if the user has been prompted or not by checking the user data from the database. Depending on the user's answer, the
affiliationcolumn would have different data (more details are included in "Backend Changes"). The system would only prompt once when the user logins to the system for the first time and would never ask again. To view the affiliation information, admins can go to the admin dashboard to view the affiliations of users.Backend Changes
Introduced column
affiliationto theusertable. This column would have three types of entry:16.sqladds the column to theusertable and ensures the existing users' affiliation column is set to null. ddl file changed as well.Added a
UserResource.scalafile to include the functions/apis related to retrieving & updating User data. Currently it only contains functions related to this PR, but in future other related functions can be added to this file as well.Original
userSchemaProposed
userSchemaFrontend Changes
Added the prompt window to pop up in the main page after logging in.
Added
affiliationcolumn to admin dashboard to cooperate with the new data.Changed files that contain class
Useras new attributeaffiliationis added to the class.Any related issues, documentation, discussions?
Closes Issue #4118.
How was this PR tested?
Manually tested.
Was this PR authored or co-authored using generative AI tooling?
Generated-by: ChatGPT 5.1 (bug fixing)