fix(editor): Allow resources to move between personal and team projects (#10683)
Co-authored-by: Danny Martini <danny@n8n.io>
This commit is contained in:
@@ -157,14 +157,6 @@ export class EnterpriseCredentialsService {
|
||||
"You can't transfer a credential into the project that's already owning it.",
|
||||
);
|
||||
}
|
||||
if (sourceProject.type !== 'team' && sourceProject.type !== 'personal') {
|
||||
throw new TransferCredentialError(
|
||||
'You can only transfer credentials out of personal or team projects.',
|
||||
);
|
||||
}
|
||||
if (destinationProject.type !== 'team') {
|
||||
throw new TransferCredentialError('You can only transfer credentials into team projects.');
|
||||
}
|
||||
|
||||
await this.sharedCredentialsRepository.manager.transaction(async (trx) => {
|
||||
// 6. transfer the credential
|
||||
|
||||
@@ -285,14 +285,6 @@ export class EnterpriseWorkflowService {
|
||||
"You can't transfer a workflow into the project that's already owning it.",
|
||||
);
|
||||
}
|
||||
if (sourceProject.type !== 'team' && sourceProject.type !== 'personal') {
|
||||
throw new TransferWorkflowError(
|
||||
'You can only transfer workflows out of personal or team projects.',
|
||||
);
|
||||
}
|
||||
if (destinationProject.type !== 'team') {
|
||||
throw new TransferWorkflowError('You can only transfer workflows into team projects.');
|
||||
}
|
||||
|
||||
// 6. deactivate workflow if necessary
|
||||
const wasActive = workflow.active;
|
||||
|
||||
Reference in New Issue
Block a user