|
|
@@ -166,17 +166,6 @@ module.exports = (crowi) => {
|
|
|
try {
|
|
|
const page = await Page.findOne({ _id: pageId });
|
|
|
|
|
|
- const disabledUserPages = crowi.configManager.getConfig(
|
|
|
- 'security:disableUserPages',
|
|
|
- );
|
|
|
-
|
|
|
- if (disabledUserPages && isUserPage(page.path)) {
|
|
|
- return res.apiv3Err(
|
|
|
- new ErrorV3('The user page is disabled.', 'forbidden-user-page'),
|
|
|
- 403,
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
const appliedAt = await getAppliedAtForRevisionFilter();
|
|
|
|
|
|
const queryOpts = {
|
|
|
@@ -280,24 +269,6 @@ module.exports = (crowi) => {
|
|
|
}
|
|
|
|
|
|
try {
|
|
|
- const page = await Page.findOne({ _id: pageId });
|
|
|
- const disabledUserPages = crowi.configManager.getConfig(
|
|
|
- 'security:disableUserPages',
|
|
|
- );
|
|
|
-
|
|
|
- if (page == null) {
|
|
|
- return res.apiv3Err(
|
|
|
- new ErrorV3('Page not found', 'notfound-page'),
|
|
|
- 404,
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
- if (disabledUserPages && isUserPage(page.path)) {
|
|
|
- return res.apiv3Err(
|
|
|
- new ErrorV3('The user page is disabled.', 'forbidden-user-page'),
|
|
|
- 403,
|
|
|
- );
|
|
|
- }
|
|
|
const revision = await Revision.findById(revisionId).populate('author');
|
|
|
|
|
|
if (revision.author != null && revision.author instanceof User) {
|