Skip to content

Fix Console bulk domain suspend and history - #3278

Open
CydeWeys wants to merge 1 commit into
google:masterfrom
CydeWeys:fix-console-bulk-domain-suspend
Open

CydeWeys wants to merge 1 commit into
google:masterfrom
CydeWeys:fix-console-bulk-domain-suspend

Conversation

@CydeWeys

@CydeWeys CydeWeys commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Fix two bugs in ConsoleBulkDomainAction:

  • Add runAsSuperuser() to ConsoleDomainActionType (returning true for
    SUSPEND and UNSUSPEND and false for DELETE) and pass it to
    EppController instead of user.getUserRoles().isAdmin(). Previously,
    DomainUpdateFlow rejected the server-only suspension statuses for
    non-admin FTE and SUPPORT_LEAD users who hold SUSPEND_DOMAIN.
    Superuser status is now driven solely by the action type, so DELETE
    never runs as superuser through the bulk domain action, even for
    admins. Superuser deletes, which bypass server statuses and can
    delete domains immediately, remain available through the nomulus CLI.
  • Prefix ConsoleUpdateHistory descriptions with <registrarId>| using
    ConsoleUpdateHistory.DESCRIPTION_SEPARATOR so bulk domain actions are
    returned by ConsoleHistoryDataAction's registrar history query and
    parsed properly in the Console history UI.
  • Add unit tests in ConsoleBulkDomainActionTest covering non-admin FTE
    and SUPPORT_LEAD suspend/unsuspend flows, permission enforcement,
    non-superuser DELETE for both admin and non-admin users, and
    ConsoleHistoryDataAction queries.

BUG= http://b/586480958


This change is Reviewable

@CydeWeys
CydeWeys requested a review from ptkach November 18, 2026 21:31
@CydeWeys

Copy link
Copy Markdown
Member Author

Do note that there are reasons to perform a superuser delete (that bypasses some checks and even can delete a domain instantly, bypassing the normal deletion lifecycle). However, this probably doesn't need to be doable through the bulk domain action.

Fix two bugs in ConsoleBulkDomainAction:

- Add runAsSuperuser() to ConsoleDomainActionType (returning true for
  SUSPEND and UNSUSPEND and false for DELETE) and pass it to
  EppController instead of user.getUserRoles().isAdmin(). Previously,
  DomainUpdateFlow rejected the server-only suspension statuses for
  non-admin FTE and SUPPORT_LEAD users who hold SUSPEND_DOMAIN.
  Superuser status is now driven solely by the action type, so DELETE
  never runs as superuser through the bulk domain action, even for
  admins. Superuser deletes, which bypass server statuses and can
  delete domains immediately, remain available through the nomulus CLI.
- Prefix ConsoleUpdateHistory descriptions with '<registrarId>|' using
  ConsoleUpdateHistory.DESCRIPTION_SEPARATOR so bulk domain actions are
  returned by ConsoleHistoryDataAction's registrar history query and
  parsed properly in the Console history UI.
- Add unit tests in ConsoleBulkDomainActionTest covering non-admin FTE
  and SUPPORT_LEAD suspend/unsuspend flows, permission enforcement,
  non-superuser DELETE for both admin and non-admin users, and
  ConsoleHistoryDataAction queries.

BUG= http://b/586480958
@CydeWeys
CydeWeys force-pushed the fix-console-bulk-domain-suspend branch from 1c308aa to e99294b Compare November 18, 2026 21:55

This branch has not been deployed

No deployments
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.

1 participant