Hey,
I've been able to use requireAccess() and requireUser() in my sync function and they both seem to be working fine. However, I can't seem to get requireRole() to work.
In the sync function I use requireRole("admin") but it always spits back forbidden missing role. My sync gateway cookie gets sent along with the call, and if I do all_docs I see all my docs.
I used the admin port to see what roles the my user has (curl -X GET localhost:4985/todos/_user/:user_id) and the role is there as a part of the admin roles ("admin_roles":["admin"]).
I also checked to see if the role exists (curl -X GET localhost:4985/todos/_role/) and it does (this gets returned ["admin"]).
I'm not sure what I am doing wrong. Is there a specific way of how requireRole() is suppose to work?
Thanks!
Jason