fix(editor): Disable changing of email and pw when SAML login enabled (#6104)

This commit is contained in:
Csaba Tuncsik 2023-04-27 12:48:53 +02:00 committed by GitHub
parent 983e6e124e
commit 3e9ecd9397
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,7 +32,7 @@
/>
</div>
</div>
<div v-if="!signInWithLdap">
<div v-if="!signInWithLdap && !signInWithSaml">
<div :class="$style.sectionHeader">
<n8n-heading size="large">{{ $locale.baseText('settings.personal.security') }}</n8n-heading>
</div>
@ -114,7 +114,7 @@ export default mixins(showMessage).extend({
validationRules: [{ name: 'VALID_EMAIL' }],
autocomplete: 'email',
capitalize: true,
disabled: this.isLDAPFeatureEnabled && this.signInWithLdap,
disabled: (this.isLDAPFeatureEnabled && this.signInWithLdap) || this.signInWithSaml,
},
},
];
@ -130,6 +130,11 @@ export default mixins(showMessage).extend({
isLDAPFeatureEnabled(): boolean {
return this.settingsStore.settings.enterprise.ldap === true;
},
signInWithSaml(): boolean {
return (
this.settingsStore.isSamlLoginEnabled && this.settingsStore.isDefaultAuthenticationSaml
);
},
},
methods: {
onInput() {