mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-12 22:26:08 -04:00
Refactor checkViewPermission to fix limited & protected permission check bug and fix code style
This commit is contained in:
parent
e00daee6c0
commit
1473437295
2 changed files with 31 additions and 23 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue