|
@@ -794,6 +794,11 @@ module.exports = (crowi) => {
|
|
|
|
|
|
|
|
const page = await Page.findByIdAndViewer(pageId, req.user, null, true);
|
|
const page = await Page.findByIdAndViewer(pageId, req.user, null, true);
|
|
|
|
|
|
|
|
|
|
+ // TODO: remove in https://redmine.weseek.co.jp/issues/136139
|
|
|
|
|
+ if (page.grantedGroups != null && page.grantedGroups.length > 1) {
|
|
|
|
|
+ return res.apiv3Err('Cannot grant multiple groups to page at the moment');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
const isEmptyAndNotRecursively = page?.isEmpty && !isRecursively;
|
|
const isEmptyAndNotRecursively = page?.isEmpty && !isRecursively;
|
|
|
if (page == null || isEmptyAndNotRecursively) {
|
|
if (page == null || isEmptyAndNotRecursively) {
|
|
|
res.code = 'Page is not found';
|
|
res.code = 'Page is not found';
|