I want to give all documents access to a specific channel. But I get 403 while pushing error telling me I don't have access to a channel.
Is it possible to give an access on the fly and do a require just after ? (Like the following.-)
access("oliver", "mobileFor");
requireAccess("mobileFor");
I made it work by removing the requireAccess("mobileFor"), and after syncing, I stop the Gateway, I add back the requireAccess("mobileFor") and start again the Gateway.
After that change, the sync goes well. It is weird because that means I can't create document when the user is new.
Thanks :)
My code is actually like this:
channel("mobileFor");
access(doc.owner, "mobileFor");
requireUser(doc.owner);
requireAccess("mobileFor");