|
|
@@ -113,6 +113,7 @@ export const createPageHandlersFactory: CreatePageHandlersFactory = (crowi) => {
|
|
|
body('body').optional().isString()
|
|
|
.withMessage('body must be string or undefined'),
|
|
|
body('grant').optional().isInt({ min: 0, max: 5 }).withMessage('grant must be integer from 1 to 5'),
|
|
|
+ body('onlyInheritUserRelatedGrantedGroups').optional().isBoolean().withMessage('onlyInheritUserRelatedGrantedGroups must be boolean'),
|
|
|
body('overwriteScopesOfDescendants').optional().isBoolean().withMessage('overwriteScopesOfDescendants must be boolean'),
|
|
|
body('pageTags').optional().isArray().withMessage('pageTags must be array'),
|
|
|
body('isSlackEnabled').optional().isBoolean().withMessage('isSlackEnabled must be boolean'),
|
|
|
@@ -229,10 +230,12 @@ export const createPageHandlersFactory: CreatePageHandlersFactory = (crowi) => {
|
|
|
let createdPage;
|
|
|
try {
|
|
|
const {
|
|
|
- grant, grantUserGroupIds, overwriteScopesOfDescendants, wip, origin,
|
|
|
+ grant, grantUserGroupIds, onlyInheritUserRelatedGrantedGroups, overwriteScopesOfDescendants, wip, origin,
|
|
|
} = req.body;
|
|
|
|
|
|
- const options: IOptionsForCreate = { overwriteScopesOfDescendants, wip, origin };
|
|
|
+ const options: IOptionsForCreate = {
|
|
|
+ onlyInheritUserRelatedGrantedGroups, overwriteScopesOfDescendants, wip, origin,
|
|
|
+ };
|
|
|
if (grant != null) {
|
|
|
options.grant = grant;
|
|
|
options.grantUserGroupIds = grantUserGroupIds;
|