|
|
@@ -769,8 +769,9 @@ describe('PageService', () => {
|
|
|
});
|
|
|
|
|
|
test('is not deletable', async() => {
|
|
|
+ const creatorId = await crowi.pageService.getCreatorIdForCanDelete(canDeleteCompletelyTestPage);
|
|
|
const userRelatedGroups = await crowi.pageGrantService.getUserRelatedGroups(testUser1);
|
|
|
- const isDeleteable = crowi.pageService.canDeleteCompletely(canDeleteCompletelyTestPage, testUser1, false, userRelatedGroups);
|
|
|
+ const isDeleteable = crowi.pageService.canDeleteCompletely(canDeleteCompletelyTestPage, creatorId, testUser1, false, userRelatedGroups);
|
|
|
expect(isDeleteable).toBe(false);
|
|
|
});
|
|
|
});
|
|
|
@@ -789,8 +790,9 @@ describe('PageService', () => {
|
|
|
});
|
|
|
|
|
|
test('is not deletable', async() => {
|
|
|
+ const creatorId = await crowi.pageService.getCreatorIdForCanDelete(canDeleteCompletelyTestPage);
|
|
|
const userRelatedGroups = await crowi.pageGrantService.getUserRelatedGroups(testUser3);
|
|
|
- const isDeleteable = crowi.pageService.canDeleteCompletely(canDeleteCompletelyTestPage, testUser3, false, userRelatedGroups);
|
|
|
+ const isDeleteable = crowi.pageService.canDeleteCompletely(canDeleteCompletelyTestPage, creatorId, testUser3, false, userRelatedGroups);
|
|
|
expect(isDeleteable).toBe(true);
|
|
|
});
|
|
|
});
|
|
|
@@ -809,8 +811,9 @@ describe('PageService', () => {
|
|
|
});
|
|
|
|
|
|
test('is deletable', async() => {
|
|
|
+ const creatorId = await crowi.pageService.getCreatorIdForCanDelete(canDeleteCompletelyTestPage);
|
|
|
const userRelatedGroups = await crowi.pageGrantService.getUserRelatedGroups(testUser1);
|
|
|
- const isDeleteable = crowi.pageService.canDeleteCompletely(canDeleteCompletelyTestPage, testUser1, false, userRelatedGroups);
|
|
|
+ const isDeleteable = crowi.pageService.canDeleteCompletely(canDeleteCompletelyTestPage, creatorId, testUser1, false, userRelatedGroups);
|
|
|
expect(isDeleteable).toBe(true);
|
|
|
});
|
|
|
});
|
|
|
@@ -829,8 +832,9 @@ describe('PageService', () => {
|
|
|
});
|
|
|
|
|
|
test('is deletable', async() => {
|
|
|
+ const creatorId = await crowi.pageService.getCreatorIdForCanDelete(canDeleteCompletelyTestPage);
|
|
|
const userRelatedGroups = await crowi.pageGrantService.getUserRelatedGroups(testUser2);
|
|
|
- const isDeleteable = crowi.pageService.canDeleteCompletely(canDeleteCompletelyTestPage, testUser2, false, userRelatedGroups);
|
|
|
+ const isDeleteable = crowi.pageService.canDeleteCompletely(canDeleteCompletelyTestPage, creatorId, testUser2, false, userRelatedGroups);
|
|
|
expect(isDeleteable).toBe(true);
|
|
|
});
|
|
|
});
|