Skip to content

feat: admin quotas — copy quotas to another user #809

Description

@ericfitz

Summary

Add a "Copy quotas to another user..." action to the admin quotas page. Purely client-side composition of existing endpoints — no API change needed.

Current Behavior

QuotaService (src/app/core/services/quota.service.ts) already has everything required: getUserAPIQuota (:39), getWebhookQuota (:66), updateUserAPIQuota (:47), updateWebhookQuota (:74), and listUsers (:115) for a target picker. The add-quota dialog's user-search block (add-quota-dialog.component.ts:110-145, template 4-53) is directly reusable.

Proposed Approach

Add a kebab item on each quota row (admin-quotas.component.html:187-192 and :439-444) opening a dialog that reuses the user-search block, previews source vs. target values, and forkJoins the source user's quotas then PUTs both to the target. Handle two edge cases deliberately: (1) a source user on system defaults has no custom quota row and GETs 404 — either block with a clear message or explicitly write the defaults; (2) the PUTs overwrite any existing custom quotas on the target — the confirm step must show the target's current values. New i18n under admin.quotas.copyDialog.*.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status
    This milestone

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions