|
@@ -937,9 +937,7 @@ schema.statics.findRecentUpdatedPages = async function (
|
|
|
const baseQuery = this.find({});
|
|
const baseQuery = this.find({});
|
|
|
const queryBuilder = new PageQueryBuilder(baseQuery, includeEmpty);
|
|
const queryBuilder = new PageQueryBuilder(baseQuery, includeEmpty);
|
|
|
|
|
|
|
|
- const isAdmin = user?.admin ?? false;
|
|
|
|
|
-
|
|
|
|
|
- if (options.hideUserPages && !isAdmin) {
|
|
|
|
|
|
|
+ if (options.hideUserPages) {
|
|
|
queryBuilder.addConditionToListByNotMatchPathAndChildren('/user');
|
|
queryBuilder.addConditionToListByNotMatchPathAndChildren('/user');
|
|
|
}
|
|
}
|
|
|
|
|
|