|
|
@@ -188,7 +188,13 @@ exports.loginRequired = function(crowi, app, isStrictly = true) {
|
|
|
|
|
|
// when the route is not strictly restricted
|
|
|
if (!isStrictly) {
|
|
|
- // TODO check guest access option
|
|
|
+ var config = req.config;
|
|
|
+ var Config = crowi.model('Config');
|
|
|
+
|
|
|
+ // when allowed to read
|
|
|
+ if (Config.isGuesstAllowedToRead(config)) {
|
|
|
+ return next();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if (req.user && '_id' in req.user) {
|