Skip to content

Commit

Permalink
Merge pull request #714 from nextcloud/fix/487/protect-provider-ident…
Browse files Browse the repository at this point in the history
…ifier

Disabled the possibility to edit the identifier
  • Loading branch information
julien-nc authored Dec 1, 2023
2 parents 67b0145 + 866ec3b commit 82e566a
Showing 1 changed file with 11 additions and 2 deletions.
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

0 comments on commit 82e566a

Please sign in to comment.