Skip to content

feat: add superadmin tab for doi management#3626

Open
tefkah wants to merge 8 commits into
mainfrom
tfk/doi-management
Open

feat: add superadmin tab for doi management#3626
tefkah wants to merge 8 commits into
mainfrom
tfk/doi-management

Conversation

@tefkah
Copy link
Copy Markdown
Member

@tefkah tefkah commented May 28, 2026

Issue(s) Resolved

As it says on the tin

Test Plan

Screenshots (if applicable)

Optional

Notes/Context/Gotchas

Supporting Docs

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 depositTargets superadmin tab kind and wired it into the SuperAdmin dashboard tab list.
  • Implemented SSR + API endpoints to list/search communities and create/update/delete/copy DepositTarget records (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 !== '') {
Comment thread server/routes/superAdminDashboard.tsx Outdated

// ── Deposit Targets API ────────────────────────────────────────────────────

const resolveCommmunity = async (identifier: string) => {
Comment thread server/routes/superAdminDashboard.tsx Outdated
Comment thread server/routes/superAdminDashboard.tsx Outdated
Comment on lines +367 to +371
if (username && password) {
const { encryptedText, initVec } = aes256Encrypt(
password,
process.env.AES_ENCRYPTION_KEY!,
);
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