mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
feat: Add workflow sharing telemetry (#4906)
* feat: Add workflow sharing telemetry * chore: fix linting issue * fix: fix telemetry typo
This commit is contained in:
@@ -66,8 +66,10 @@ import { IWorkflowSettings } from 'n8n-workflow';
|
||||
import { useNDVStore } from '@/stores/ndv';
|
||||
import { useTemplatesStore } from '@/stores/templates';
|
||||
import { useNodeTypesStore } from '@/stores/nodeTypes';
|
||||
import { useWorkflowsEEStore } from "@/stores/workflows.ee";
|
||||
import { useUsersStore } from "@/stores/users";
|
||||
import { useUsersStore } from '@/stores/users';
|
||||
import { useWorkflowsEEStore } from '@/stores/workflows.ee';
|
||||
import { ICredentialMap, ICredentialsResponse, IUsedCredential } from '@/Interface';
|
||||
import { getWorkflowPermissions, IPermissions } from '@/permissions';
|
||||
import { ICredentialsResponse } from '@/Interface';
|
||||
|
||||
let cachedWorkflowKey: string | null = '';
|
||||
@@ -85,6 +87,9 @@ export const workflowHelpers = mixins(externalHooks, nodeHelpers, restApi, showM
|
||||
useUsersStore,
|
||||
useUIStore,
|
||||
),
|
||||
workflowPermissions(): IPermissions {
|
||||
return getWorkflowPermissions(this.usersStore.currentUser, this.workflowsStore.workflow);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
executeData(
|
||||
@@ -827,7 +832,15 @@ export const workflowHelpers = mixins(externalHooks, nodeHelpers, restApi, showM
|
||||
this.uiStore.removeActiveAction('workflowSaving');
|
||||
|
||||
if (error.errorCode === 100) {
|
||||
const url = this.$router.resolve({ name: VIEWS.WORKFLOW, params: { name: currentWorkflow }}).href;
|
||||
this.$telemetry.track('User attempted to save locked workflow', {
|
||||
workflowId: currentWorkflow,
|
||||
sharing_role: this.workflowPermissions.isOwner ? 'owner' : 'sharee',
|
||||
});
|
||||
|
||||
const url = this.$router.resolve({
|
||||
name: VIEWS.WORKFLOW,
|
||||
params: { name: currentWorkflow },
|
||||
}).href;
|
||||
|
||||
const overwrite = await this.confirmMessage(
|
||||
this.$locale.baseText('workflows.concurrentChanges.confirmMessage.message', {
|
||||
|
||||
Reference in New Issue
Block a user