summaryrefslogtreecommitdiff
path: root/lib/response.js
diff options
context:
space:
mode:
authorWu Cheng-Han2017-01-16 23:47:53 +0800
committerWu Cheng-Han2017-01-16 23:47:53 +0800
commit14734372956fa5d6c6159ba8c4b00a90b80ea8d6 (patch)
treea128ffb026a1c9ad20e7107f8ffed45819869d6b /lib/response.js
parente00daee6c0dd0c6e5f2654d24995bc9d86fbc452 (diff)
Refactor checkViewPermission to fix limited & protected permission check bug and fix code style
Diffstat (limited to '')
-rwxr-xr-xlib/response.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/response.js b/lib/response.js
index 57d6861d..585d1d54 100755
--- a/lib/response.js
+++ b/lib/response.js
@@ -127,10 +127,10 @@ function checkViewPermission(req, note) {
else
return true;
} else if (note.permission == 'limited' || note.permission == 'protected') {
- if( !req.isAuthenticated() ) {
+ if(!req.isAuthenticated())
return false;
- }
- return true;
+ else
+ return true;
} else {
return true;
}