Skip to content

CF Users: selection-driven action bar (Manage Roles + Remove) across CF/org/space pages - #5475

Merged
norman-abramovitz merged 14 commits into
cloudfoundry:developfrom
nabramovitz:feature/cf-users-remove-actions
Jun 20, 2026
Merged

CF Users: selection-driven action bar (Manage Roles + Remove) across CF/org/space pages#5475
norman-abramovitz merged 14 commits into
cloudfoundry:developfrom
nabramovitz:feature/cf-users-remove-actions

Conversation

@nabramovitz

Copy link
Copy Markdown
Contributor

Adds a selection-driven action bar to the three Cloud Foundry Users pages (CF-level, org, space), replacing the per-row kebab for role management and removal.

What changed

  • An always-visible action bar on the "Total Users" line of each Users page:
    • Manage Roles (primary) — opens the existing role wizard seeded from the selected users.
    • Remove buttons, scoped per page: the CF-level page has "Remove from Spaces" and "Remove from Org and Spaces"; the org page has "Remove from Org and Spaces"; the space page has "Remove from Space".
  • Buttons stay disabled until the action is valid for the current selection (permission + role presence), with a tooltip explaining why, and a "N selected / Clear" indicator.
  • The per-row kebab is retired on all three pages — manage and remove now flow from row selection.
  • Removal fans out through the existing signal-native endpoint (POST /pp/v1/cf/roles/:cnsi/changes) with add:false changes; per-change failures and changes skipped for lack of permission are surfaced to the user.
  • Extends the shared ListSubNavComponent with selection-aware action buttons (primary/destructive/disabled variants). Backward-compatible with existing consumers.

Notes

  • Also corrects a latent production-build break inherited from the prior Users work: a (this as { ... }).privateField cast on canManageRoles that compiles under vitest but fails the Angular compiler. Converted to field initializers.
  • Remove is intentionally coarse (scope = page context + button). Targeted "pick which orgs and spaces" is deferred to a later phase (the role-assignment widget).

Testing

  • Unit tests for the pure change-builder, the orchestrator, the ListSubNavComponent extension, and each of the three page components.
  • Live-verified against a real Cloud Foundry on all three pages: enabled/disabled states, the confirm-and-apply flow, and the per-row kebab removal.

Always-visible action bar on the Total Users line via the extended
ListSubNavComponent: blue primary Manage Roles + red destructive
Remove from Spaces / Remove from Org and Spaces, disabled-until-valid
(selection + permission + role-presence) with help tooltips, plus a
'N selected / Clear' affordance. Retires the per-row kebab. Removal
fans out via the existing signal-native executeChanges endpoint.

Signals use field initializers (canManageRoles/selectedUsers/
subNavActions/selectedCount), not the (this as {Public}).private cast
that fails the production tsc build — which also corrects a latent
Phase-1 canManageRoles prod-build break.

@norman-abramovitz norman-abramovitz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Second cleanup roles interface. Still want to add the missing V3 roles and continue working on a cleaner-looking interface.

@norman-abramovitz
norman-abramovitz merged commit f42c266 into cloudfoundry:develop Jun 20, 2026
12 checks passed
@nabramovitz
nabramovitz deleted the feature/cf-users-remove-actions branch June 20, 2026 02:03
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