fix(editor): Add disabled state with tooltip on project creation buttons if user lacks permission (#13867)

This commit is contained in:
Guillaume Jacquart
2025-03-12 16:14:02 +01:00
committed by GitHub
parent c7bcdc544d
commit e33d0d7466
6 changed files with 85 additions and 26 deletions

View File

@@ -294,6 +294,7 @@ const {
createCredentialsAppendSlotName,
projectsLimitReachedMessage,
upgradeLabel,
hasPermissionToCreateProjects,
} = useGlobalEntityCreation();
onClickOutside(createBtn as Ref<VueInstance>, () => {
createBtn.value?.close();
@@ -385,7 +386,14 @@ onClickOutside(createBtn as Ref<VueInstance>, () => {
placement="right"
:content="projectsLimitReachedMessage"
>
<N8nIcon
v-if="!hasPermissionToCreateProjects"
style="margin-left: auto; margin-right: 5px"
icon="lock"
size="xsmall"
/>
<N8nButton
v-else
:size="'mini'"
style="margin-left: auto"
type="tertiary"