Skip to content

replaced previous toggle syntax with current options#2726

Open
renejeglinsky wants to merge 4 commits into
mainfrom
rjegl/remove-toggle01
Open

replaced previous toggle syntax with current options#2726
renejeglinsky wants to merge 4 commits into
mainfrom
rjegl/remove-toggle01

Conversation

@renejeglinsky

Copy link
Copy Markdown
Contributor

No description provided.

@renejeglinsky
renejeglinsky requested a review from danjoa as a code owner July 7, 2026 13:49
### In Development

<div class="impl node">
CAP Node.js' `mocked-auth` strategy has built-in support for toggling features per tenant, per user, or per request. CAP Java's [Mock User Authentication with Spring Boot](../../java/security#mock-users) allows to assign feature toggles to users based on the mock user configuration. To demonstrate toggling features per tenant, or user, you can add these lines of configuration to our `package.json` of the SAP Fiori app (Node.js) or to the mock user configuration in the `srv/src/main/resources/application.yaml` file (CAP Java).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@agoerler Is there meanwhile also the option to toggle by tenant in CAP Java? The current config doesn't show that.

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.

In CAP Java you can declare mock users and assign a [mock] tenant to a mock user. You can also specify the set of features flags that are enabled per mock user. But you can't configure features per [mock] tenant. https://pages.github.tools.sap/cap/docs/java/security#mock-users

If you badly want to assign features to a tenant you could register a custom FeatureToggleInfoProvide that selects the features based on the tenant. But you can't do this declaratively.

![A standard SAP Fiori UI including the new columns ratings and isbn that are available to erin.](assets/image-20220630132726831.png)

## Feature Vector Providers {.node}
## Feature Vector Providers in Node.js

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@agoerler Is there anything equivalent in CAP Java?

@renejeglinsky
renejeglinsky requested a review from smahati as a code owner July 8, 2026 08:37
@renejeglinsky
renejeglinsky requested a review from agoerler July 9, 2026 08:33
Comment thread guides/deploy/build.md Outdated
Comment thread guides/extensibility/feature-toggles.md Outdated
Comment thread node.js/cds-serve.md Outdated
Co-authored-by: René Jeglinsky <rene.jeglinsky@sap.com>
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