feat: add superadmin tab for doi management#3626
Open
tefkah wants to merge 8 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new SuperAdmin “Deposit Targets” tab to manage DOI deposit configuration per community, including server-side APIs and a client-side management UI.
Changes:
- Added a new
depositTargetssuperadmin tab kind and wired it into the SuperAdmin dashboard tab list. - Implemented SSR + API endpoints to list/search communities and create/update/delete/copy
DepositTargetrecords (with optional encrypted credentials). - Added a full client UI for managing deposit targets, plus a small resilience change to pub label rendering.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| utils/superAdmin.ts | Adds depositTargets to the allowed superadmin tab kinds. |
| server/routes/superAdminDashboard.tsx | Adds SSR props for the new tab and implements DepositTarget/Community search APIs. |
| server/depositTarget/model.ts | Adds a BelongsTo association to Community for convenient includes. |
| client/containers/SuperAdminDashboard/tabs.tsx | Registers the new “Deposit Targets” tab component. |
| client/containers/SuperAdminDashboard/DepositTargets/index.ts | Barrel export for the new tab. |
| client/containers/SuperAdminDashboard/DepositTargets/DepositTargets.tsx | New UI for creating/editing/copying/deleting deposit targets. |
| client/containers/SuperAdminDashboard/DepositTargets/depositTargets.scss | Styling for the new deposit targets tab UI. |
| client/containers/DashboardSettings/PubSettings/PubSettings.tsx | Introduces a debug console.log in DOI settings rendering. |
| client/containers/DashboardOverview/overviewRows/labels.tsx | Adds a guard for missing scopeSummary (with a console.error). |
| client/components/DevCommunitySwitcherMenu/communities.ts | Adds a dev-only community option entry. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| }; | ||
|
|
||
| const renderDoi = () => { | ||
| console.log('BBBBBBBB'); |
|
|
||
| export const getTypicalPubLabels = (pub: Pub) => { | ||
| if (!pub.scopeSummary) { | ||
| console.error(`No scope summary for pub "${pub.title}" (${pub.slug})`); |
Comment on lines
+179
to
+186
| const body: Record<string, any> = { | ||
| doiPrefix: editDoiPrefix.trim(), | ||
| service: editService, | ||
| }; | ||
| if (editUsername !== '') { | ||
| body.username = editUsername.trim(); | ||
| } | ||
| if (editPassword !== '') { |
|
|
||
| // ── Deposit Targets API ──────────────────────────────────────────────────── | ||
|
|
||
| const resolveCommmunity = async (identifier: string) => { |
Comment on lines
+367
to
+371
| if (username && password) { | ||
| const { encryptedText, initVec } = aes256Encrypt( | ||
| password, | ||
| process.env.AES_ENCRYPTION_KEY!, | ||
| ); |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue(s) Resolved
As it says on the tin
Test Plan
Screenshots (if applicable)
Optional
Notes/Context/Gotchas
Supporting Docs