Read-only privelege for anonymous access

This commit is contained in:
Shane Kilkelly 2017-09-20 09:36:06 +01:00
parent 06966f67db
commit fc202439ab

View file

@ -25,9 +25,11 @@ module.exports = AuthorizationManager =
return callback null, PrivilegeLevels.READ_ONLY, true
else if project.publicAccesLevel == PublicAccessLevels.READ_AND_WRITE
return callback null, PrivilegeLevels.READ_AND_WRITE, true
else if project.publicAccesLevel == PublicAccessLevels.TOKEN_BASED
return callback null, PrivilegeLevels.READ_ONLY, false
else
return callback null, PrivilegeLevels.NONE, false
if !user_id?
getPublicAccessLevel()
else