Skip to content

Commit

Permalink
Clean up formatting of advanced group/permission claims on authentica…
Browse files Browse the repository at this point in the history
…tion page
  • Loading branch information
advplyr committed Mar 30, 2024
1 parent 7e8fd91 commit a5d7a81
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 8 additions & 7 deletions client/pages/config/authentication.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,20 @@
<p class="pl-4 text-sm text-gray-300">{{ $strings.LabelAutoRegisterDescription }}</p>
</div>

<div class="flex items-center pt-6 pb-1 px-1 w-full">{{ $strings.LabelOpenIDClaims }}</div>
<div class="flex items-center mb-2">
<div class="w-96">
<p class="pt-6 mb-4 px-1">{{ $strings.LabelOpenIDClaims }}</p>

<div class="flex mb-4">
<div class="w-44 min-w-44">
<ui-text-input-with-label ref="openidGroupClaim" v-model="newAuthSettings.authOpenIDGroupClaim" :disabled="savingSettings" :placeholder="'groups'" :label="'Group Claim'" />
</div>
<p class="pl-4 text-sm text-gray-300 mt-5" v-html="$strings.LabelOpenIDGroupClaimDescription"></p>
<p class="pl-4 text-sm text-gray-300" v-html="$strings.LabelOpenIDGroupClaimDescription"></p>
</div>

<div class="flex mb-2">
<div class="w-96 pt-6">
<div class="flex mb-4">
<div class="w-44 min-w-44">
<ui-text-input-with-label ref="openidAdvancedPermsClaim" v-model="newAuthSettings.authOpenIDAdvancedPermsClaim" :disabled="savingSettings" :placeholder="'abspermissions'" :label="'Advanced Permission Claim'" />
</div>
<div class="pl-4 text-sm text-gray-300 mt-5 flex-column">
<div class="pl-4 text-sm text-gray-300 flex-column">
<p v-html="$strings.LabelOpenIDAdvancedPermsClaimDescription"></p>
<pre class="text-pre-wrap mt-2"
>{{ newAuthSettings.authOpenIDSamplePermissions }}
Expand Down
2 changes: 1 addition & 1 deletion server/Auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ class Auth {
throw new Error(`Advanced permissions claim ${absPermissionsClaim} not found in userinfo`)

if (user.updatePermissionsFromExternalJSON(absPermissions)) {
Logger.debug(`[Auth] openid callback: Updating advanced perms for user "${user.username}" using "${JSON.stringify(absPermissions)}"`)
Logger.info(`[Auth] openid callback: Updating advanced perms for user "${user.username}" using "${JSON.stringify(absPermissions)}"`)
await Database.userModel.updateFromOld(user)
}
}
Expand Down

0 comments on commit a5d7a81

Please sign in to comment.