Skip to content

Conversation

@adityashibu
Copy link
Member

This pull request introduces several changes to enhance user management and device allocation functionalities in the backend and frontend of the application. The most important changes include the addition of a new user request model, updates to user management endpoints, and frontend modifications to support role-based access control.

Backend Changes:

  • Added UserRequest model to handle user creation with optional allocated devices (backend/fastAPI.py).
  • Modified add_new_user endpoint to accept a UserRequest object and handle allocated devices (backend/fastAPI.py).
  • Updated add_user function to include allocated devices and user role assignment (backend/users.py) [1] [2].
  • Enhanced select_user and get_selected_user functions to include user roles in the response (backend/users.py).

Frontend Changes:

  • Introduced role-based access control for device management functionalities (frontend/src/app/devices/page.jsx) [1] [2].
  • Added a new user dialog component for adding users with allocated devices (frontend/src/app/ui/newUserDialogue.jsx).
  • Modified account menu to display user role and allow super users to add new accounts (frontend/src/app/ui/dashboard/accountMenu.jsx) [1] [2].

@adityashibu adityashibu requested a review from david-g-f March 9, 2025 14:29
Copy link
Contributor

@david-g-f david-g-f left a comment

Choose a reason for hiding this comment

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

Looks good

@david-g-f david-g-f merged commit 78752c9 into PowerHouse-Project:main Mar 9, 2025
7 checks passed
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.

3 participants