mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
refactor(core): Enable interim updates check (#4582)
* ⚡ Enable interim updates check * ⚡ Set default value * ⏪ Undo default value, keep as sentinel * 🧪 Unskip tests
This commit is contained in:
parent
0148631d28
commit
e7316c588f
|
@ -196,13 +196,13 @@ export class WorkflowsService {
|
|||
);
|
||||
}
|
||||
|
||||
// if (!forceSave && workflow.hash !== shared.workflow.hash) {
|
||||
// throw new ResponseHelper.ResponseError(
|
||||
// `Workflow ID ${workflowId} cannot be saved because it was changed by another user.`,
|
||||
// undefined,
|
||||
// 400,
|
||||
// );
|
||||
// }
|
||||
if (!forceSave && workflow.hash !== '' && workflow.hash !== shared.workflow.hash) {
|
||||
throw new ResponseHelper.ResponseError(
|
||||
`Workflow ID ${workflowId} cannot be saved because it was changed by another user.`,
|
||||
undefined,
|
||||
400,
|
||||
);
|
||||
}
|
||||
|
||||
// check credentials for old format
|
||||
await WorkflowHelpers.replaceInvalidCredentials(workflow);
|
||||
|
|
|
@ -730,7 +730,7 @@ describe('PATCH /workflows/:id - validate credential permissions to user', () =>
|
|||
});
|
||||
});
|
||||
|
||||
describe.skip('PATCH /workflows/:id - validate interim updates', () => {
|
||||
describe('PATCH /workflows/:id - validate interim updates', () => {
|
||||
it('should block owner updating workflow nodes on interim update by member', async () => {
|
||||
const owner = await testDb.createUser({ globalRole: globalOwnerRole });
|
||||
const member = await testDb.createUser({ globalRole: globalMemberRole });
|
||||
|
|
Loading…
Reference in a new issue