allow guests in withAccess

This commit is contained in:
Eric Burel 2018-09-11 18:08:29 +02:00
parent f0fb423b3f
commit c4945ddc2f

View file

@ -13,7 +13,7 @@ export default function withAccess (options) {
// if there are any groups defined check if user belongs, else just check if user exists // if there are any groups defined check if user belongs, else just check if user exists
canAccess = currentUser => { canAccess = currentUser => {
return groups ? currentUser && Users.isMemberOf(currentUser, groups) : currentUser; return groups ? Users.isMemberOf(currentUser, groups) : currentUser;
} }
// redirect on constructor if user cannot access // redirect on constructor if user cannot access