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

1486 - Giving the capability for admin to change user access level for any user #1750

Merged
merged 2 commits into from
Sep 24, 2024

Conversation

ntrehan
Copy link
Member

@ntrehan ntrehan commented Sep 23, 2024

Fixes #1486

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

  • Provided a toggle in the edit users screen granting an admin the capability to change the access level of a user
  • refactored CSS files to avoid code repitition
  • added restrictions on the model layer allowing accessLevel to be either of the 2 strings "user" and "admin"

Screenshots of Proposed Changes Of The Website

Visuals before changes are applied

image

Visuals after changes are applied

image

@trillium
Copy link
Member

trillium commented Sep 24, 2024

image

🤣 Perct, this allows me to remove admin access from Josh

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 is a solid PR, thank you @ntrehan !

<div className="user-is-active-column-left">Is Active:</div>
<div className="is-active-flex">
<span className="active-status">{isActive.toString()}</span>
<div className="ua-row toggle-flex">
Copy link
Member

Choose a reason for hiding this comment

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

Solid class rename

@@ -37,6 +37,15 @@ const UserAdmin = () => {
}, [userApiService, fetchUsers]
)

// Update user's access level (admin/user)
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for following convention by keeping the bd calls in one spot here

@jbubar jbubar merged commit a5f1d59 into hackforla:development Sep 24, 2024
2 of 5 checks passed
@JackHaeg
Copy link
Member

@ntrehan Just noticed that there is a small spelling error in the screenshots - "VRSM ADMIN" when it should be "VRMS ADMIN"
Screenshot 2024-09-24 at 12 09 46 PM

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.

Create ability for Admins to promote and demote Admins
4 participants