Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/Entity/Form/AppEditForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ protected function saveAppCredentials(AppInterface $app, FormStateInterface $for
foreach ($form_state->getValue('credential', []) as $credential_key => $credential_changes) {
foreach ($app->getCredentials() as $credential) {
if ($credential_key === $credential->getConsumerKey()) {
$credentialScopes = $credential->getScopes();
$original_api_product_ids = [];
// Cast it to array to be able handle the same way the single- and
// multi-select configuration.
Expand All @@ -232,6 +233,10 @@ protected function saveAppCredentials(AppInterface $app, FormStateInterface $for

// Do not add anything to the results if there were no change.
if ($product_list_changed) {
// Updates scopes for Credentials if present.
if (count($credentialScopes) > 0) {
$app_credential_controller->overrideScopes($credential_key, $credentialScopes);
}
$results[] = TRUE;
}
break;
Expand Down
Loading