feat(CentralIdentity): add campus admin roles mgmt to user view#736
feat(CentralIdentity): add campus admin roles mgmt to user view#736jakeaturner merged 1 commit intomasterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds campus admin role management to the Central Identity user detail view, and standardizes organization ordering coming from the backend.
Changes:
- Sort
/orgsresults bynameserver-side. - Add
CampusAdminRolesSectionand render it inCentralIdentityUserView. - Add new client API helpers for user roles + organizations, and remove the legacy roles modal.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| server/api/organizations.ts | Adds a $sort stage so organizations are returned alphabetically. |
| client/src/screens/conductor/controlpanel/CentralIdentity/CentralIdentityUserView.tsx | Adds campus admin roles section and refines loading/layout behavior in the user view. |
| client/src/components/controlpanel/CentralIdentity/CampusAdminRolesSection.tsx | New UI to list/grant/revoke campus admin roles via React Query + API calls. |
| client/src/api.ts | Adds getUserRoles, updateUserRole, and getAllOrganizations API methods. |
| client/src/components/controlpanel/UsersManager/ManageUserRolesModal.tsx | Removes legacy modal implementation. |
| client/src/components/controlpanel/CentralIdentity/UserSupportTickets.tsx | Minor layout spacing adjustment. |
| client/src/components/controlpanel/CentralIdentity/UserConductorData.tsx | Minor layout spacing adjustment. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
client/src/components/controlpanel/CentralIdentity/CampusAdminRolesSection.tsx
Show resolved
Hide resolved
client/src/components/controlpanel/CentralIdentity/CampusAdminRolesSection.tsx
Show resolved
Hide resolved
client/src/components/controlpanel/CentralIdentity/CampusAdminRolesSection.tsx
Show resolved
Hide resolved
client/src/screens/conductor/controlpanel/CentralIdentity/CentralIdentityUserView.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Adds campus-admin role management to the CentralIdentity user detail view, aligning server-side role update permissions with LibreTexts superadmin-only access and improving org listing order.
Changes:
- Add a new CentralIdentity “Campus Admin Roles” section (grant/revoke per organization) in the user view and introduce supporting client API methods.
- Restrict role update/delete endpoints to
libretextssuperadminand disallow assigningsuperadminvia the standard role update endpoint. - Sort
/orgsresults by organization name at the API level and remove the legacy roles-management modal.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| server/api/users.js | Tightens role assignment rules (blocks superadmin assignment; blocks campusadmin for libretexts). |
| server/api/organizations.ts | Adds server-side $sort by name for /orgs results. |
| server/api.js | Updates middleware so role update/delete endpoints require libretexts superadmin. |
| client/src/screens/conductor/controlpanel/CentralIdentity/CentralIdentityUserView.tsx | Adds CampusAdminRolesSection to the user view; refines loading states/UI. |
| client/src/components/controlpanel/CentralIdentity/CampusAdminRolesSection.tsx | New UI for viewing/granting/removing campusadmin roles using React Query + new API methods. |
| client/src/components/controlpanel/UsersManager/ManageUserRolesModal.tsx | Removes legacy modal implementation. |
| client/src/components/controlpanel/CentralIdentity/UserSupportTickets.tsx | Minor layout adjustment (removes bottom margin). |
| client/src/components/controlpanel/CentralIdentity/UserConductorData.tsx | Minor layout adjustment (adds top margin). |
| client/src/api.ts | Adds typed wrappers for /user/roles, /user/role/update, and /orgs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
client/src/screens/conductor/controlpanel/CentralIdentity/CentralIdentityUserView.tsx
Outdated
Show resolved
Hide resolved
|
🎉 This PR is included in version 2.122.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
No description provided.