Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Julien Veyssier <[email protected]>
Signed-off-by: Armin Berger <[email protected]>
  • Loading branch information
bergerar and julien-nc committed Nov 2, 2024
1 parent b3f4372 commit f3e3fe4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/Controller/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,8 @@ public function code(string $state = '', string $code = '', string $scope = '',

if($syncGroups === null || count($syncGroups) === 0) {
$this->logger->debug('Prevented user from login as user is not part of a whitelisted group');
$message = $this->l10n->t('You do not have permission to log in to this instance. If you believe this is an error, please contact an Administrator.');
return $this->build403TemplateResponse($message, Http::STATUS_FORBIDDEN, ['reason' => 'user not allowed to login']);
$message = $this->l10n->t('You do not have permission to log in to this instance. If you think this is an error, please contact an administrator.');
return $this->build403TemplateResponse($message, Http::STATUS_FORBIDDEN, ['reason' => 'user not in any whitelisted group']);
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/components/SettingsForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -264,13 +264,13 @@
type="text">
</p>
<p class="settings-hint">
{{ t('user_oidc', 'Only groups matching the whitelist regex will be created, updated and deleted by the group claim') }}
{{ t('user_oidc', 'Only groups matching the whitelist regex will be created, updated and deleted by the group claim. For example: {regex} allows all groups which ID starts with {substr}', { regex: '/^blue/', substr: 'blue' }) }}
</p>
<NcCheckboxRadioSwitch :checked.sync="localProvider.settings.restrictLoginToGroups" wrapper-element="div">
{{ t('user_oidc', 'Restrict login for users without whitelisted groups.') }}
{{ t('user_oidc', 'Restrict login for users that are not in any whitelisted group') }}
</NcCheckboxRadioSwitch>
<p class="settings-hint">
{{ t('user_oidc', 'Users that are not part of a whitelisted group are not created and can not login') }}
{{ t('user_oidc', 'Users that are not part of any whitelisted group are not created and can not login') }}
</p>
<NcCheckboxRadioSwitch :checked.sync="localProvider.settings.checkBearer" wrapper-element="div">
{{ t('user_oidc', 'Check Bearer token on API and WebDav requests') }}
Expand Down

0 comments on commit f3e3fe4

Please sign in to comment.