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

Disabled the possibility to edit the identifier #714

Merged
merged 4 commits into from
Dec 1, 2023
Merged
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
13 changes: 11 additions & 2 deletions src/components/SettingsForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@
<template>
<form class="provider-edit">
<p>
<label for="oidc-identifier">{{ t('user_oidc', 'Identifier') }}</label>
<label for="oidc-identifier" :class="{ warning: identifierLength >= maxIdentifierLength }">{{ t('user_oidc', 'Identifier (max 128 characters)') }}</label>
<input id="oidc-identifier"
v-model="localProvider.identifier"
type="text"
:placeholder="t('user_oidc', 'Display name to identify the provider')"
required>
:disabled="identifierInitiallySet"
required
:maxlength="maxIdentifierLength">
</p>
<p>
<label for="oidc-client-id">{{ t('user_oidc', 'Client ID') }}</label>
Expand Down Expand Up @@ -190,10 +192,17 @@ export default {
data() {
return {
localProvider: null,
maxIdentifierLength: 128,
}
},
computed: {
identifierLength() {
return this.localProvider.identifier.length
},
},
created() {
this.localProvider = this.provider
this.identifierInitiallySet = !!this.localProvider.identifier
},
}
</script>
Expand Down
Loading