@@ -481,6 +481,10 @@ module.exports = function(crowi) {
if (grant === GRANT_USER_GROUP) {
this.grantedGroup = grantUserGroupId;
}
+
+ if (grant === GRANT_PUBLIC && grantUserGroupId !== null) {
+ this.grantedGroup = null;
+ }
};
@@ -561,10 +561,6 @@ module.exports = function(crowi, app) {
return res.json(ApiResponse.error('Parameters body and path are required.'));
- if (!grant) {
- return res.json(ApiResponse.error('Grant is not selected'));
- }
-
// check page existence
const isExist = await Page.count({ path: pagePath }) > 0;
if (isExist) {