Skip to content

Tran/users admin#5

Open
tnt07-t wants to merge 8 commits intomainfrom
tran/users-admin
Open

Tran/users admin#5
tnt07-t wants to merge 8 commits intomainfrom
tran/users-admin

Conversation

@tnt07-t
Copy link
Contributor

@tnt07-t tnt07-t commented Mar 11, 2026

Overview

Added admin authorization and an isAdmin field to the Users model. Also removed legacy GitHub-related routes and models, including services listing functionality.

Changes Made

  • added isAdmin to the Users model
  • added requireAdmin middleware
  • restricted GET /users to admin users only
  • removed serviceslisting and other legacy Hustle routes/models

Test Coverage

Tested locally.

  • normal user requesting GET /users returns the expected error
  • admin user requesting GET /users successfully receives all users

Next Steps

  • Make admin-creation route (admin-protected)

Copy link
Contributor

@JoshD94 JoshD94 left a comment

Choose a reason for hiding this comment

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

lgtm

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.

2 participants