Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Override API key for (sub)pages #356

Open
timwehrmann opened this issue Sep 9, 2024 · 0 comments
Open

[FEATURE] Override API key for (sub)pages #356

timwehrmann opened this issue Sep 9, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@timwehrmann
Copy link

Is your feature request related to a problem? Please describe.
No.

Describe the solution you'd like
A customer wants to have the possibility to set an API key per page tree. But not bound to a root page, it is more on subpage tree level. We think that it'd be best to have an (optional) data record that can be placed somewhere in the page tree. On each translation request the rootline has to be gathered and each entry has to be checked if a record is placed there. If so, take the API key from there. If not, take it from extension config.

Describe alternatives you've considered
From our point of view the configuration can other take place in TypoScript, in a data record or in a structured file (e.g. YAML) file where you define a pid and a corresponding API key. Since we are in backend context all the time, TypoScript is not the way to go from our point of view. YAML 'd be possible, but is not as flexible as a data record in terms of a deployment.

Additional context
We think that the exact location of where to implement the change is either Configuration::getApiKey() or Configuration::__construct(). In both cases we have the information about the page we are translating something. So all we need to do is getting the rootline for that given page and get the information if the API key should be overridden or not. We (as Leuchtfeuer) can provide a patch / PR for that.

@timwehrmann timwehrmann added the enhancement New feature or request label Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant