feat(editor): SAML login disables Invite button (#5922)

This commit is contained in:
Csaba Tuncsik 2023-04-07 13:29:48 +02:00 committed by GitHub
parent d40e86aabc
commit 3fdc4413c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 7 deletions

View file

@ -1173,6 +1173,7 @@
"settings.users.inviteLink.copy": "Copy Invite Link",
"settings.users.inviteLink.error": "Could not retrieve invite link",
"settings.users.invite": "Invite",
"settings.users.invite.tooltip": "SAML login is activated. Users should be created in the IdP and will be provisioned in n8n on their first sign on.",
"settings.users.inviteNewUsers": "Invite new users",
"settings.users.copyInviteUrls": "You can now send the invitation links directly to your users",
"settings.users.inviteResent": "Invite resent",

View file

@ -3,13 +3,21 @@
<div>
<n8n-heading size="2xlarge">{{ $locale.baseText('settings.users') }}</n8n-heading>
<div :class="$style.buttonContainer" v-if="!usersStore.showUMSetupWarning">
<n8n-tooltip :disabled="!ssoStore.isSamlLoginEnabled">
<template #content>
<span> {{ $locale.baseText('settings.users.invite.tooltip') }} </span>
</template>
<div>
<n8n-button
:disabled="ssoStore.isSamlLoginEnabled"
:label="$locale.baseText('settings.users.invite')"
@click="onInvite"
size="large"
data-test-id="settings-users-invite-button"
/>
</div>
</n8n-tooltip>
</div>
</div>
<div v-if="!settingsStore.isUserManagementEnabled" :class="$style.setupInfoContainer">
<n8n-action-box
@ -64,6 +72,7 @@ import { useSettingsStore } from '@/stores/settings';
import { useUsersStore } from '@/stores/users';
import { BaseTextKey } from '@/plugins/i18n';
import { useUsageStore } from '@/stores/usage';
import { useSSOStore } from '@/stores/sso';
export default mixins(showMessage, copyPaste).extend({
name: 'SettingsUsersView',
@ -76,7 +85,7 @@ export default mixins(showMessage, copyPaste).extend({
}
},
computed: {
...mapStores(useSettingsStore, useUIStore, useUsersStore, useUsageStore),
...mapStores(useSettingsStore, useUIStore, useUsersStore, useUsageStore, useSSOStore),
isSharingEnabled() {
return this.settingsStore.isEnterpriseFeatureEnabled(EnterpriseEditionFeature.Sharing);
},