Skip to content

Added ban user for user management, added email templates in views#103

Merged
JunHammy merged 17 commits intomainfrom
junhan
Aug 2, 2024
Merged

Added ban user for user management, added email templates in views#103
JunHammy merged 17 commits intomainfrom
junhan

Conversation

@JunHammy
Copy link
Copy Markdown
Contributor

@JunHammy JunHammy commented Aug 1, 2024

What was done in this PR

  1. Added ban user endpoint
  2. Added edit user details endpoint
  3. Added HTML email templates in view folder
  4. Middleware auth.js detects if user is banned and returns 403 if user is banned
  5. Added validateAdmin middleware in auth.js to detect if current logged in user is a admin

Sensitive changes

  1. Added banned column to UserRecord table.
  2. Changed Warnings model to have reason, datetime, createdAt, updatedAt, issuingAdminID, hostID`

@JunHammy JunHammy requested a review from Prakhar896 August 1, 2024 17:25
@JunHammy JunHammy added the enhancement New feature or request label Aug 1, 2024
Comment thread README.md Outdated
Comment thread routes/identity/Admin/UserManagement.js Outdated
Comment thread routes/identity/Admin/UserManagement.js Outdated
Comment thread routes/identity/Admin/UserManagement.js Outdated
Comment thread routes/identity/Admin/UserManagement.js Outdated
Comment thread routes/identity/Admin/UserManagement.js Outdated
Comment thread routes/identity/Admin/UserManagement.js Outdated
Comment thread routes/identity/Admin/UserManagement.js Outdated
Comment thread routes/identity/Admin/UserManagement.js Outdated
Comment thread routes/identity/Admin/superuserAPI.js Outdated
Co-authored-by: Joshua Long  <Sadliquid@users.noreply.github.com>
Co-authored-by: Prakhar Trivedi <Prakhar896@users.noreply.github.com>
@JunHammy JunHammy requested a review from Prakhar896 August 2, 2024 06:42
Copy link
Copy Markdown
Contributor

@Prakhar896 Prakhar896 left a comment

Choose a reason for hiding this comment

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

LGTM, awaiting frontend approval before merge.

@JunHammy JunHammy requested a review from Prakhar896 August 2, 2024 13:22
@JunHammy JunHammy merged commit ed8609a into main Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants