Skip to content

Commit

Permalink
add missing mapping-groups
Browse files Browse the repository at this point in the history
  • Loading branch information
aro-lew committed Dec 15, 2023
1 parent a477be7 commit 87bb32b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion lib/Command/UpsertProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ protected function configure() {
->addOption('mapping-display-name', null, InputOption::VALUE_OPTIONAL, 'Attribute mapping of the display name')
->addOption('mapping-email', null, InputOption::VALUE_OPTIONAL, 'Attribute mapping of the email address')
->addOption('mapping-quota', null, InputOption::VALUE_OPTIONAL, 'Attribute mapping of the quota')
->addOption('mapping-groups', null, InputOption::VALUE_OPTIONAL, 'Attribute mapping of the groups')
->addOption('mapping-uid', null, InputOption::VALUE_OPTIONAL, 'Attribute mapping of the user id')
->addOption('extra-claims', null, InputOption::VALUE_OPTIONAL, 'Extra claims to request when getting tokens')

Expand Down Expand Up @@ -107,7 +108,7 @@ protected function execute(InputInterface $input, OutputInterface $output) {
return in_array($option, [
'identifier', 'clientid', 'clientsecret', 'discoveryuri',
'scope', 'unique-uid', 'check-bearer', 'endsessionendpointuri',
'mapping-uid', 'mapping-display-name', 'mapping-email', 'mapping-quota',
'mapping-uid', 'mapping-display-name', 'mapping-email', 'mapping-quota', 'mapping-groups',
'extra-claims'
]) && $value !== null;
}, ARRAY_FILTER_USE_BOTH);
Expand Down Expand Up @@ -175,6 +176,9 @@ protected function execute(InputInterface $input, OutputInterface $output) {
if ($mapping = $input->getOption('mapping-quota')) {
$this->providerService->setSetting($provider->getId(), ProviderService::SETTING_MAPPING_QUOTA, $mapping);
}
if ($mapping = $input->getOption('mapping-groups')) {
$this->providerService->setSetting($provider->getId(), ProviderService::SETTING_MAPPING_GROUPS, $mapping);
}
if ($mapping = $input->getOption('mapping-uid')) {
$this->providerService->setSetting($provider->getId(), ProviderService::SETTING_MAPPING_UID, $mapping);
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/SettingsForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@
placeholder="quota">
</p>
<p>
<label for="mapping-quota">{{ t('user_oidc', 'Groups mapping') }}</label>
<input id="mapping-quota"
<label for="mapping-groups">{{ t('user_oidc', 'Groups mapping') }}</label>
<input id="mapping-groups"
v-model="localProvider.settings.mappingGroups"
type="text"
placeholder="groups"
Expand Down

0 comments on commit 87bb32b

Please sign in to comment.