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

add missing mapping-groups #736

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
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
Loading