Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deny null #1020

Merged
merged 9 commits into from
Jun 19, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/server/routes/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ module.exports = function(crowi, app) {
api.create = async function(req, res) {
const body = req.body.body || null;
const pagePath = req.body.path || null;
const grant = req.body.grant || null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

初期化コードは変えたくないので、null で初期化されても上手く動くように、後続のコードを変えてほしい。

const grant = req.body.grant || 1;
const grantUserGroupId = req.body.grantUserGroupId || null;
const overwriteScopesOfDescendants = req.body.overwriteScopesOfDescendants || null;
const isSlackEnabled = !!req.body.isSlackEnabled; // cast to boolean
Expand Down Expand Up @@ -620,7 +620,7 @@ module.exports = function(crowi, app) {
const pageBody = req.body.body || null;
const pageId = req.body.page_id || null;
const revisionId = req.body.revision_id || null;
const grant = req.body.grant || null;
const grant = req.body.grant || 1;
const grantUserGroupId = req.body.grantUserGroupId || null;
const overwriteScopesOfDescendants = req.body.overwriteScopesOfDescendants || null;
const isSlackEnabled = !!req.body.isSlackEnabled; // cast to boolean
Expand Down