Skip to content

feat(api-client): change the access (client scopes) of an existing API client - #4611

Merged
Abhinegi2 merged 3 commits into
masterfrom
claude/quirky-heisenberg-5k9a2p
Oct 30, 2026
Merged

Abhinegi2 merged 3 commits into
masterfrom
claude/quirky-heisenberg-5k9a2p

Conversation

@sleidig

@sleidig sleidig commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

On the admin "API Access" page, each API client now has a "Change access" button (pen icon). It opens a dialog to change the client's scopes. The client keeps its credentials, and the list reloads after saving.

Requires the backend endpoint PUT /v1/admin/api-client/{clientId}/scope from Aam-Digital/aam-services#272. Merge and deploy that first. Until then, saving shows the backend's error message in the dialog.

  • Refactor (separate commit): the scope selection list and the single sign-on warning move from the create dialog into a new ApiClientScopeSelectionComponent, so both dialogs share it. A failure to load the scopes is now shown inside that component.
  • New EditApiClientScopesDialogComponent. Save is disabled until something changes and while no scope is selected.
  • ApiClientService.updateScopes()

Manual Testing Steps

Setup (if needed)

  1. A backend with the aam-services PR above and with Keycloak admin access (admin.api-client enabled). Not available in demo mode.

Steps

  1. Admin → API Access → create an API client with "Read reports and their results" → the list shows it with that access
  2. Click the pen icon ("Change access") on it → the dialog shows the current access as selected, and "Save" is disabled
  3. Also select "Sign in users from the external system (single sign-on)" → the warning about signing in as any user appears
  4. Save → the dialog closes and the list shows both kinds of access
  5. Open the dialog again and deselect everything → "Save" stays disabled

PR Checklist

Before you request a manual PR review from someone, please go through all of this list:

  • manually tested (all) required functionality yourself and wrote clear steps for manual testing (including the config needed, in the all-features config)
  • reviewed the "Files changed" section of the PR briefly
  • added label "Final Review" to trigger UI regression testing (Argos visual review)
  • triggered CodeRabbit AI review by commenting "@coderabbitai review" (e2e tests run automatically on every push)
  • marked each code review comment as resolved (or commented on it with a question, if unsure)

--> then mark the PR "Ready for Review"


Unit tests for api-client pass locally (31 tests) and the development build succeeds. Not manually tested against a backend.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Fb2hmonEJ4GPn7E8vpSMBC

… own component

So that it can be reused to change the scopes of an existing API client.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fb2hmonEJ4GPn7E8vpSMBC
…I client

Account managers can change which client scopes an API client has from the
API Access admin page, without creating new credentials for the external system.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fb2hmonEJ4GPn7E8vpSMBC
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

Deployed to https://pr-4611.aam-digital.net/

@sleidig
sleidig marked this pull request as ready for review October 29, 2026 15:14
…default since Angular 22

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fb2hmonEJ4GPn7E8vpSMBC
@sleidig
sleidig requested a review from Abhinegi2 October 29, 2026 15:17

@Abhinegi2 Abhinegi2 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

looks good to me

@Abhinegi2
Abhinegi2 merged commit 8bcf2f6 into master Oct 30, 2026
19 checks passed
@Abhinegi2
Abhinegi2 deleted the claude/quirky-heisenberg-5k9a2p branch October 30, 2026 10:23
@sleidig

sleidig commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

🎉 This PR is included in version 4.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@sleidig sleidig added the released managed by CI (semantic-release) label Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released managed by CI (semantic-release)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change the access of an existing API client

3 participants