mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 19:32:15 +00:00
feat(core): Add LDAP support (#3835)
This commit is contained in:
@@ -16,6 +16,7 @@ import { IFormBoxConfig } from '@/Interface';
|
||||
import { VIEWS } from '@/constants';
|
||||
import { mapStores } from 'pinia';
|
||||
import { useUsersStore } from '@/stores/users';
|
||||
import { useSettingsStore } from '@/stores/settings';
|
||||
|
||||
export default mixins(showMessage).extend({
|
||||
name: 'SigninView',
|
||||
@@ -23,7 +24,22 @@ export default mixins(showMessage).extend({
|
||||
AuthView,
|
||||
},
|
||||
data() {
|
||||
const FORM_CONFIG: IFormBoxConfig = {
|
||||
return {
|
||||
FORM_CONFIG: {} as IFormBoxConfig,
|
||||
loading: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapStores(useUsersStore, useSettingsStore),
|
||||
},
|
||||
mounted() {
|
||||
let emailLabel = this.$locale.baseText('auth.email');
|
||||
const ldapLoginLabel = this.settingsStore.ldapLoginLabel;
|
||||
const isLdapLoginEnabled = this.settingsStore.isLdapLoginEnabled;
|
||||
if (isLdapLoginEnabled && ldapLoginLabel) {
|
||||
emailLabel = ldapLoginLabel;
|
||||
}
|
||||
this.FORM_CONFIG = {
|
||||
title: this.$locale.baseText('auth.signin'),
|
||||
buttonText: this.$locale.baseText('auth.signin'),
|
||||
redirectText: this.$locale.baseText('forgotPassword'),
|
||||
@@ -32,10 +48,10 @@ export default mixins(showMessage).extend({
|
||||
{
|
||||
name: 'email',
|
||||
properties: {
|
||||
label: this.$locale.baseText('auth.email'),
|
||||
label: emailLabel,
|
||||
type: 'email',
|
||||
required: true,
|
||||
validationRules: [{ name: 'VALID_EMAIL' }],
|
||||
...(!isLdapLoginEnabled && { validationRules: [{ name: 'VALID_EMAIL' }] }),
|
||||
showRequiredAsterisk: false,
|
||||
validateOnBlur: false,
|
||||
autocomplete: 'email',
|
||||
@@ -56,14 +72,6 @@ export default mixins(showMessage).extend({
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
return {
|
||||
FORM_CONFIG,
|
||||
loading: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapStores(useUsersStore),
|
||||
},
|
||||
methods: {
|
||||
async onSubmit(values: { [key: string]: string }) {
|
||||
|
||||
Reference in New Issue
Block a user