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

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/9f5b0b0d-93d0-49e4-955b-14b9906f16cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to