diff options
author | Wu Cheng-Han | 2017-01-16 23:47:53 +0800 |
---|---|---|
committer | Wu Cheng-Han | 2017-01-16 23:47:53 +0800 |
commit | 14734372956fa5d6c6159ba8c4b00a90b80ea8d6 (patch) | |
tree | a128ffb026a1c9ad20e7107f8ffed45819869d6b /lib/response.js | |
parent | e00daee6c0dd0c6e5f2654d24995bc9d86fbc452 (diff) |
Refactor checkViewPermission to fix limited & protected permission check bug and fix code style
Diffstat (limited to 'lib/response.js')
-rwxr-xr-x | lib/response.js | 6 |
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; } |