Refactor checkViewPermission to fix limited & protected permission check bug and fix code style
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user