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

Added Super User Functionality #1765

Merged
merged 4 commits into from
Oct 17, 2024
Merged

Added Super User Functionality #1765

merged 4 commits into from
Oct 17, 2024

Conversation

ntrehan
Copy link
Member

@ntrehan ntrehan commented Sep 28, 2024

Fixes #1747

What changes did you make and why did you make them ?

  • Disabled the ability to edit anything of the super user in the super user page
  • Added a new access level "superadmin" in the User Model
  • Some CSS changes to reflect that the buttons are disabled for a superadmin
  • Corrections from previous PR, "VRSM Admin" changed to "VRMS Admin" and the whole row is in one line
  • Please note that I promoted "[email protected]" to superadmin in vrms-test just for testing purposes

Screenshots of Proposed Changes Of The Website (if any, please do not screen shot code changes)

Visuals before changes are applied

image

Visuals after changes are applied

image

Copy link
Member

@trillium trillium left a comment

Choose a reason for hiding this comment

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

This looks good, thanks for putting in the work to switch this around.

@@ -9,6 +9,9 @@ const EditUsers = ({ userToEdit, backToSearch, updateUserDb, projects, updateUse
const [isActive, setIsActive] = useState(userToEdit.isActive);
const [isAdmin, setIsAdmin] = useState(userToEdit.accessLevel === "admin");

// Function to check if the current user is the super admin
Copy link
Member

Choose a reason for hiding this comment

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

Semantics, but this comment says you provided a function but you've provided a boolean

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch trillium! I changed approach mid way but forgot to change the comment. Addressing it right away

@trillium
Copy link
Member

trillium commented Oct 15, 2024

I approved the pull request, but can you please change the word function to boolean in the comment you provided

@trillium trillium merged commit d1a2b0d into hackforla:development Oct 17, 2024
2 of 5 checks passed
@trillium
Copy link
Member

Merged!

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.

Implement Super Admin User Feature
2 participants