Skip to content

Commit

Permalink
feat: automatically add "user" role when testing for access by authen…
Browse files Browse the repository at this point in the history
…ticated user
  • Loading branch information
gr2m committed Sep 12, 2016
1 parent 4b6c7c4 commit 3257031
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/config/store/pre-auth-hook.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function onStorePreAuth (request, reply) {
delete request.headers.authorization
request.headers.cookie = 'AuthSession=' + session.id

var roles = session.account.roles.concat('id:' + session.account.id)
var roles = session.account.roles.concat('id:' + session.account.id, 'user')

return server.plugins.store.api.hasAccess(dbName, {
access: requiredAccess,
Expand Down

0 comments on commit 3257031

Please sign in to comment.