Having issues syncing Non-Public Documents. When logging as an authenticated user their channel documents are not being synced to the device but the public ones are.

2020-04-16 Thread Christopher Hobbs
Hello, so I am currently looking into an issue where the documents that are in a specified channel are not syncing to the cb-lite on my device. Our sync function as i understand it the default function: "databases": { "dbName": {

Re: Pull all purged docs in a channel

2017-04-06 Thread Jens Alfke
> On Apr 6, 2017, at 7:42 AM, Newlix Yang <newlix...@gmail.com> wrote: > > Can I pull back the purged docs in a channel without updating the docs? You’d need to do a pull replication that doesn’t have a saved checkpoint, so it’ll start over from the beginning and find and down

Pull all purged docs in a channel

2017-04-06 Thread Newlix Yang
Hi, Can I pull back the purged docs in a channel without updating the docs? -- 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 mobile-couchbas

Re: CouchbaseMobile Replicate specific Channel (REST API)

2015-12-22 Thread Shiv Veerashetty
Thanks a lot Jens. I will try this and update. Best Regards Shiv On Tuesday, December 22, 2015 at 12:32:18 AM UTC+5:30, Jens Alfke wrote: > > > On Dec 20, 2015, at 10:24 PM, Shiv Veerashetty > wrote: > > To replicate documents, i am using rest apis in my ionic

Re: CouchbaseMobile Replicate specific Channel (REST API)

2015-12-21 Thread Jens Alfke
On Dec 20, 2015, at 10:24 PM, Shiv Veerashetty > wrote: To replicate documents, i am using rest apis in my ionic application. Can some tell me , how to replicate from specific channels only ? add “filter”: “sync_gateway/bychannel”,

CouchbaseMobile Replicate specific Channel (REST API)

2015-12-20 Thread Shiv Veerashetty
Hi Team, To replicate documents, i am using rest apis in my ionic application. Can some tell me , how to replicate from specific channels only ? http://developer.couchbase.com/documentation/mobile/1.1.0/develop/references/couchbase-lite/rest-api/server/post-replicate/index.html As per above

Re: Is there any limit on the number of channel tags of a document.

2015-10-30 Thread john . vieten
ts say I have 1 to n million users. Each user has his own channel. Now > is it feasible that a documents could have for example 100 channel tags? > > > The only *hard* limit I can think of is that a Couchbase Server doc can’t > exceed 20MB, and SG stores a list of a docum

Re: Is there any limit on the number of channel tags of a document.

2015-10-29 Thread Jens Alfke
On Oct 28, 2015, at 11:29 PM, john.vie...@gmail.com<mailto:john.vie...@gmail.com> wrote: Lets say I have 1 to n million users. Each user has his own channel. Now is it feasible that a documents could have for example 100 channel tags? The only hard limit I can

Is there any limit on the number of channel tags of a document.

2015-10-29 Thread john . vieten
I am referring to http://developer.couchbase.com/documentation/mobile/1.1.0/develop/guides/sync-gateway/channels/intro/index.html Lets say I have 1 to n million users. Each user has his own channel. Now is it feasible that a documents could have for example 100 channel tags? Many Greetings

Re: ! channel

2015-10-09 Thread Jens Alfke
On Oct 9, 2015, at 12:16 PM, Seung Chan Lim <djs...@gmail.com<mailto:djs...@gmail.com>> wrote: I vaguely remember hearing about a "!" channel for saw 1.1. Is this implemented and if so what exactly does it do? I couldn't find documentation on it. It was added in

! channel

2015-10-09 Thread Seung Chan Lim
I vaguely remember hearing about a "!" channel for saw 1.1. Is this implemented and if so what exactly does it do? I couldn't find documentation on it. would love your help slim -- You received this message because you are subscribed to the Google Groups "Couchbas

does the action of delete docs from CBL which have remove channel cause conflict?

2015-07-23 Thread atom992
docA {type:TYPE1,KEY1:value1} have channel(channel1); and USER1 was assigned to channel1; and when I start sync, docA has synced to USER1's CBL; Now some logic trigger the sync function, cause USER1 don'e have channel1; but at the same time,docA still in USER1's CBL,right? If I deleted docA from

Re: Can I query docs only that I have right to query in Couchbase Lite when doc’s channel be changed?

2015-06-15 Thread Jens Alfke
On Jun 15, 2015, at 10:00 AM, atom992 yangzijun...@gmail.com wrote: now channelC’s right be removed from user1,so user1 should only query docA and docB, but for https://github.com/couchbase/sync_gateway/issues/264 docC will not be deleted in CouchbaseLite. so I want to only query docA

Re: Assigning a document to a channel on the fly

2015-06-08 Thread Jens Alfke
On Jun 8, 2015, at 7:07 AM, Florion COIFFÉ cflor...@gmail.com wrote: 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. It’s users that have to be given access to channels; documents are put in channels

Assigning a document to a channel on the fly

2015-06-08 Thread Florion COIFFÉ
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

Re: Doubt of document channel

2015-06-03 Thread Jens Alfke
On Jun 3, 2015, at 7:52 AM, Victor Fernandez vfernan...@txmglobal.com wrote: I already tried to assign null channel to obsolete operative” documents You don’t need to assign a channel at all, to remove the doc. If the sync function doesn’t call channel( ), the document won’t be assigned

Re: Doubt of document channel

2015-06-02 Thread Victor Fernandez
to discard old docs and synchronize only the earliest ones. in a previous post (https://groups.google.com/forum/#!topic/mobile-couchbase/9iOm9Sk50FQ) you had suggested me that create a channel by week but this approach, is not suitable for this purpose because it will discard my configuration

Re: Doubt of document channel

2015-06-02 Thread Jens Alfke
On Jun 2, 2015, at 8:51 AM, Victor Fernandez vfernan...@txmglobal.com wrote: So what I’m trying to do then, is to set an “oldChannel” (noExiste) to the old operative documents so that they are not visible to the mobile app any more. Or you could just not assign them to any channel

Doubt of document channel

2015-06-01 Thread Victor Fernandez
}, txm2: { seq: 5978, rev: 1-aae23304cdee262c2ccb53c8dd80e0bd } }, access: { noexiste: { noexiste: 5978 } } I'm filtering in the iOS side by channel txm, but I am still having this document synchronized (it suppose that now

Re: Doubt of document channel

2015-06-01 Thread Victor Fernandez
How can I check this? I'm doing an allDocumentsQuery from CBLDatabase and I have the last revision of the document. Nevertheless this document have only one revision. What revision of the document do you have on the client? (How many revisions are there?) —Jens -- You received this

Re: Doubt of document channel

2015-06-01 Thread Jens Alfke
On Jun 1, 2015, at 3:27 PM, Victor Fernandez vfernan...@txmglobal.com wrote: I'm filtering in the iOS side by channel txm, but I am still having this document synchronized (it suppose that now is of the channel noexiste). What revision of the document do you have on the client? (How many

Re: Doubt of document channel

2015-06-01 Thread Jens Alfke
On Jun 1, 2015, at 3:57 PM, Victor Fernandez vfernan...@txmglobal.com wrote: How can I check this? Get the document in the app and look at its “_rev” property. I'm doing an allDocumentsQuery from CBLDatabase and I have the last revision of the document. Nevertheless this document have

Re: Filtering pull request by user and channel

2015-05-21 Thread Victor Fernandez
Yeah sure, the connection is with the port 4984 El jueves, 21 de mayo de 2015, 12:31:39 (UTC-5), ajres escribió: Is the *self.gatewayURL accessing the Public REST API on port :4984 and not the admin port on :4985?* *Andy* -- You received this message because you are subscribed to the

Re: Filtering pull request by user and channel

2015-05-21 Thread Jens Alfke
On May 21, 2015, at 8:52 AM, Victor Fernandez vfernan...@txmglobal.com wrote: In the iOS app I am creating a CBLReplication object with pull request filtered by channel name despite of this the app is pulling all the documents without restrictions. So maybe I need to filter the pull

Re: Filtering pull request by user and channel

2015-05-21 Thread Jens Alfke
On May 21, 2015, at 9:18 AM, Victor Fernandez vfernan...@txmglobal.com wrote: self.pullGateway.filter=@sync_gateway/bychannel; self.pullGateway.filterParams=[[NSDictionary alloc] initWithObjectsAndKeys:@local, @channels, nil]; The preferred way to do this is

Re: Filtering pull request by user and channel

2015-05-21 Thread Victor Fernandez
Hi Jens I'm doing this in my sync function * if(doc.date!=actualDateString){ console.log(This document must not be synchronized); channel(x); access(x,x); }else{ channel(local);access(local,local); }* I already test the if/else and it's working fine

Re: Filtering pull request by user and channel

2015-05-21 Thread Victor Fernandez
No, I don't think that the object is nil. This is the complete block *self.pullGateway = [self.database createPullReplication: self.gatewayURL];self.pullGateway.filter=@sync_gateway/bychannel;self.pullGateway.filterParams=[[NSDictionary alloc] initWithObjectsAndKeys:@x, @channels,

Re: Filtering pull request by user and channel

2015-05-21 Thread ajres
Is the *self.gatewayURL accessing the Public REST API on port :4984 and not the admin port on :4985?* *Andy* -- 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

Re: Trouble in changing access of doc's channel

2015-05-18 Thread ajres
@atom992 If you started a new sync after you changed docC you should only get docB and docC. If you ran sync from the start then once docA has been sync'd to the client it will not be removed if the user looses access to the channel it was originally pulled from. There is a ticket describing

Trouble in changing access of doc's channel

2015-05-18 Thread atom992
Hi,all I have a trouble in changing access of channel,: I have three docs: doc A like this:{type:typeA,key:keyA} doc B like this:{type:typeB,key:keyB} doc C like this:{type:typeC,key:keyC,refer_id:keyA,user_id:user1} and one user:user1 with no roles and admin_channels in sync gateway

Re: Trouble in changing access of doc's channel

2015-05-18 Thread atom992
looses access to the channel it was originally pulled from. There is a ticket describing this behaviour [here]( https://github.com/couchbase/sync_gateway/issues/264) Andy -- You received this message because you are subscribed to the Google Groups Couchbase Mobile group. To unsubscribe from

Re: sync function issue - got 'undefined' when set doc's channel with value that included doc.keys

2015-05-13 Thread atom992
my whole sync function like this: function(doc,oldDoc){ if(doc.type == type1){ if(doc.key_id1){ channel('u-' + doc.key_id1); } } if(doc.type == type2){ if(doc.key_id){ channel('b-'+doc.key_id); } } } If I use switch I get right result. On Tuesday, May 12, 2015

sync function issue - got 'undefined' when set doc's channel with value that included doc.keys

2015-05-11 Thread atom992
Hi,all I am using sync gateway 1.0.4, my sync function like this : function(doc,oldDoc){ if (doc.type == MESSAGE) { if(doc.key_id){ var key_id = doc.key_id; channel('k-'+key_id); } } } and my doc like this:{id:MSG001,type:MESSAGE,key_id:key001,body:test1} when I

Re: sync function issue - got 'undefined' when set doc's channel with value that included doc.keys

2015-05-11 Thread Jens Alfke
Weird — is that your sync function exactly as present in the config file? Because my guess is that there’s a typo in one of the places you put “key_id”, even though that isn’t showing up in the code you posted. Because it’s clear that the variable key_id in the channel(…) call is undefined

Re: what happened on synced documents when the channel be changed?

2015-05-05 Thread Jens Alfke
in queries since it doesn't have other properties that your map function would look for. If document A have 3 property, and each property determines user's channel. does this means i should write sync function like this: if(document A have property P1 ) {access(user1,P1)} if(document A have

what happened on synced documents when the channel be changed?

2015-05-05 Thread atom992
Hi,all I am using Couchbase Lite 1.0.4 on Android and sync gateway 1.0.4.I have a question about sync gateway's channel.If I have a user U with role role1,document A set : access(doc._id,role1). and I have sync the document A with user U. I want to know that If the user's role role1 has

Re: what happened on synced documents when the channel be changed?

2015-05-05 Thread Jens Alfke
have been removed ,user B should not assign channel1.how should I do to remove channel1 from user B when document A's property P1 have been removed? I'm not quite sure I understand the question. If the sync function evaluating document A calls access( ) to grant user B access to a channel

Re: what happened on synced documents when the channel be changed?

2015-05-05 Thread atom992
function doesn't grant user B access, then user B will no longer have access to the channel. ” If document A have 3 property, and each property determines user's channel. does this means i should write sync function like this: if(document A have property P1 ) {access(user1,P1)} if(document A have

Filtered PullReplication on a channel

2015-04-24 Thread Nitz Malikarjun
couchbase server.? Channel and filter can work together? Basically I want to pull some filtered docs which belongs to a channel. Have created views and done some emit http://docs.couchbase.com/admin/admin/UI/ui-views-editor.html. Is the the way the filters work if i am not using couchDB?if so

Re: Filtered PullReplication on a channel

2015-04-24 Thread Traun Leyden
Nitihin, Looks like you posted here *and* the forum: https://forums.couchbase.com/t/filtered-pullreplication-on-a-channel/3601 Please just post it once, since otherwise it will lead to confusion and extra work. (to be fair, I realize it's confusing that we have multiple forums.. ) On Fri

Re: Need help with channel structure

2015-04-07 Thread Christoph Berlin
another document change. Meaning if project document gets updated, the sync function could gather all profile files with a reference to this project document and update the channel permissions. If course that would require features such as cross document reference and removal of channel access

Re: Need help with channel structure

2015-04-05 Thread Jakob Hoydis
Hi Christop, But if I am not mistaken it doesn't handle removal of users because the already removed user and his channel don't get overwritten once the user is removed. We could identify the removed users as a difference of old doc and doc but then we cannot remove access of the other

Re: Need help with channel structure

2015-04-03 Thread Christoph Berlin
Hey Jakob, Thanks so much for your detailed response land this looks pretty neat! We didn't think of creating a channel for each user and then assigning others. Duh! But if I am not mistaken it doesn't handle removal of users because the already removed user and his channel don't get

Re: Need help with channel structure

2015-04-03 Thread Jakob Hoydis
Hi, One option would be to create a channel for every user to which he/she gets access. The channel name is a simple function of the user id, e.g. 'user_'+id. The profile document of a user is the only document in this channel The project document contains an array of the user ids

Need help with channel structure

2015-04-02 Thread Christoph Berlin
Hi everyone, we are struggling a bit a little bit with finding a suitable channel structure for our project. Here are the requirements: 1) Each user has a profile document (first name, last name, user ID, etc.) Those profile documents are initially accessible by the owner only 2) A user can

Re: wild card channel

2015-03-17 Thread Jens Alfke
On Mar 17, 2015, at 5:35 PM, Seung Chan Lim djs...@gmail.com wrote: Yes, ! is exactly what I'm looking for. When's 1.0.4 due out? Good question. It’s been code-frozen for several months but there have been logistical issues holding up releasing it. Each of our main Github repositories has

wild card channel

2015-03-17 Thread Seung Chan Lim
In my sync function I call: channel(*) on a document, and I'm expecting now any authenticated user to be able to see the content of this document. But I'm proven wrong by reality. I get forbidden to my request. When I look at the metadata I see this: _sync: { rev: 1

Re: wild card channel

2015-03-17 Thread Adam Fraser
The * channel doesn't make documents public (viewable to everyone). It's the reverse scenario - users who have been granted access to the * channel can view all documents. You don't need to explicitly add documents to the * channel - all documents are automatically added. In Sync Gateway

Re: wild card channel

2015-03-17 Thread Seung Chan Lim
Got it. I now understand that when I give a user access to the * channel, that user has access to all document (i.e. giving GUEST access to * channel would, in most cases, be a bad idea, for example. ) Am I understanding right? Yes, ! is exactly what I'm looking for. When's 1.0.4 due out

Re: Official guide for public channel support

2015-02-25 Thread Jens Alfke
On Feb 24, 2015, at 10:51 PM, Christoph Berlin m...@christophberlin.com wrote: Thanks Constantine, I usually go by the the couchbase website because the github release are relatively confusing. 1.0.4 was published on github but not 1.0.3 nor 1.0.2. 1.0.4 has not been officially

Re: Wild card channel filter for replication?

2015-02-24 Thread Jens Alfke
On Feb 23, 2015, at 5:16 PM, Christoph Berlin hoptoawesomen...@gmail.com wrote: Question: is there a way to run a filtered replication with wildcards? For example pull.channel=@firstSync*? No, unfortunately. Channels have to be specified explicitly. —Jens -- You received this message

Re: Official guide for public channel support

2015-02-24 Thread Christoph Berlin
To: mobile-couchbase@googlegroups.commailto:mobile-couchbase@googlegroups.com mobile-couchbase@googlegroups.commailto:mobile-couchbase@googlegroups.com Subject: Re: Official guide for public channel support It looks like new installation packages for 1.0.4 were not published but a github release

Re: Official guide for public channel support

2015-02-24 Thread Constantine Kozak
a public channel - the question is how? :) We read nearly all previous posts about this subject and tried to make sense of the documentation but it is still not clear to use what is actually support and more importantly recommended. Here are our requirements: 1. While every user (group) has

Wild card channel filter for replication?

2015-02-23 Thread Christoph Berlin
a second channel per account, called firstSync-account name (account name is place holder for user name) that only contains the mandatory documents. 3) We then run a one-off replication with .channel = firstSync-account name. Once this one-off replication has been completed, we switch to the main app

Re: Official guide for public channel support

2015-02-23 Thread Christoph Berlin
@googlegroups.com Date: Thursday, December 25, 2014 at 3:28 PM To: mobile-couchbase@googlegroups.commailto:mobile-couchbase@googlegroups.com mobile-couchbase@googlegroups.commailto:mobile-couchbase@googlegroups.com Subject: Re: Official guide for public channel support On Dec 25, 2014, at 1:52 PM, Christoph

Re: finding out who has access to a given channel

2015-02-21 Thread Seung Chan Lim
/_dumpchannel/:channelname GET request on the admin port, but I get back a 404 channel not found when the channel exists. _dumpchannel just logs recent/cached changes on that channel. It’s mostly useful for troubleshooting the _changes feed implementation. Sounds like in your case

Re: finding out who has access to a given channel

2015-02-20 Thread James Nocentini
I'm not sure, i think there's a /:dbname/_dumpchannel/:channelname GET request on the admin port, but I get back a 404 channel not found when the channel exists. See screenshot below, the user John has access to the 'public_notes' channel. http://cl.ly/image/3N3M2J3s0U3n/Screen%20Shot%202015

Re: finding out who has access to a given channel

2015-02-20 Thread James Nocentini
/_dumpchannel/:channelname GET request on the admin port, but I get back a 404 channel not found when the channel exists. _dumpchannel just logs recent/cached changes on that channel. It’s mostly useful for troubleshooting the _changes feed implementation. Sounds like in your case there weren’t

finding out who has access to a given channel

2015-02-19 Thread Seung Chan Lim
I remember there being a REST API to finding out which users (and role?) have access to a given channel. I can't find out where in the docs this is stated. Could someone help? thank you slim -- You received this message because you are subscribed to the Google Groups Couchbase Mobile group

Re: Official guide for public channel support

2014-12-26 Thread Christoph Berlin
@googlegroups.com Date: Thursday, December 25, 2014 at 3:28 PM To: mobile-couchbase@googlegroups.commailto:mobile-couchbase@googlegroups.com mobile-couchbase@googlegroups.commailto:mobile-couchbase@googlegroups.com Subject: Re: Official guide for public channel support On Dec 25, 2014, at 1:52 PM

Official guide for public channel support

2014-12-25 Thread Christoph Berlin
Hi there, First of all, happy holidays everyone. We would have a quick question regarding creating a public channel - the question is how? :) We read nearly all previous posts about this subject and tried to make sense of the documentation but it is still not clear to use what is actually

Re: Official guide for public channel support

2014-12-25 Thread Jens Alfke
On Dec 25, 2014, at 1:52 PM, Christoph Berlin hoptoawesomen...@gmail.com wrote: We would have a quick question regarding creating a public channel - the question is how? :) Adam added support for a public channel recently — it'll be in SG 1.0.4, which will be released in January

Re: Official guide for public channel support

2014-12-25 Thread Christoph Berlin
Thanks Jens. On Dec 25, 2014, at 3:28 PM, Jens Alfke j...@couchbase.commailto:j...@couchbase.com wrote: On Dec 25, 2014, at 1:52 PM, Christoph Berlin hoptoawesomen...@gmail.commailto:hoptoawesomen...@gmail.com wrote: We would have a quick question regarding creating a public channel

Trouble trying to remove doc from channel

2014-12-18 Thread thomas . salomon
Hello, I am having a trouble trying to remove a doc from a channel. My doc is of type story and has a property named channels. My sync function says : if (doc.model_type == 'Story') {channel(doc.channels);} At first : channels = [public] and my doc is only in the public channel Then, I change

Re: Trouble trying to remove doc from channel

2014-12-18 Thread Jens Alfke
On Dec 18, 2014, at 11:51 AM, thomas.salo...@teckeezy.com wrote: Then I removes preload from channels property meaning channels = [public] in my database But it seems that the sync function does not apply and does not remove the doc from the preload channel. Check that the document has

Re: Trouble trying to remove doc from channel

2014-12-18 Thread thomas . salomon
Thanks Jens for your quick answer. I did what you asked for and I received as an answer the same revision number as the POST command and a channels=[public]... I am a bit (actually completely) lost. It's as if the sync function did not apply... HTTP/1.1 200 OK Content-Encoding: gzip

Re: Trouble trying to remove doc from channel

2014-12-18 Thread Jens Alfke
Hm. Just to make sure: You're changing the document through the Gateway REST API (or client replication), not modifying the bucket directly, right? Could you show your entire sync function, please? Also, please get the raw form of the document in the bucket, either through the Couchbase Server

Re: Trouble trying to remove doc from channel

2014-12-18 Thread thomas . salomon
I have a shadow bucket config. I am changing my doc in my web bucket and changes are shadowed in the sync bucket. It works perfectly fine for all other operations (including adding doc to new channels). my sync function : https://gist.github.com/thomasgithub/638120cb39c4910864fa my raw doc :

Re: Trouble trying to remove doc from channel

2014-12-18 Thread Jens Alfke
The raw view of the doc shows it's only in the public channel, not preload, so it's in the correct state. Weird. Maybe this is a bug in the _all_docs handler? Are there other indications besides _all_docs that the doc is in the wrong channels? Have you checked the _changes feed for the preload

Sync Gateway Replication not restricting by channel

2014-12-01 Thread Johnathan Grayson
). If they then create a document and put it in a channel (sync function) in theory at least if I wipe the phone and log them in again that document should not be replicated back to their phone right? This is the post box scenario. I can't see anyone else reporting a similar issue so I know I'm doing something

Re: Sync Gateway Replication not restricting by channel

2014-12-01 Thread ajres
In your demo App, change AppDelegate.swift from private let kServerUrl = http://192.168.1.6:4985/default/; to private let kServerUrl = http://192.168.1.6:4984/default/; 4985 is the Admin port, so no authentication applies there, usually this port would not be exposed to mobile clients. Andy

Re: Sync Gateway Replication not restricting by channel

2014-12-01 Thread Johnathan Grayson
Thanks for the quick response Andy! It worked a treat. On Tuesday, 2 December 2014 05:30:52 UTC+13, ajres wrote: In your demo App, change AppDelegate.swift from private let kServerUrl = http://192.168.1.6:4985/default/; to private let kServerUrl = http://192.168.1.6:4984/default/;

Re: SyncGateway : What should happen when a user gets access to a new channel with a continuous replication running?

2014-10-17 Thread ajres
@Jakob Which versions of sync_gateway and CBLite (or TiTouchDB) are you running? Andy -- 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

Re: SyncGateway : What should happen when a user gets access to a new channel with a continuous replication running?

2014-10-17 Thread Jakob Hoydis
a continuous replication with CBLite on SyncGateway - There is a document 'A' which belongs to channel 'CHN_A'. The user does not have access to the document yet. - Document B is written to the database which will give User 1 access to CHN_A. What we observe is that document 'A' will not get

Re: SyncGateway : What should happen when a user gets access to a new channel with a continuous replication running?

2014-10-17 Thread Jakob Hoydis
replication with CBLite on SyncGateway - There is a document 'A' which belongs to channel 'CHN_A'. The user does not have access to the document yet. - Document B is written to the database which will give User 1 access to CHN_A. What we observe is that document 'A' will not get replicated

Re: SyncGateway : What should happen when a user gets access to a new channel with a continuous replication running?

2014-10-17 Thread Jens Alfke
On Oct 17, 2014, at 6:54 AM, Jakob Hoydis ja...@spraed.net wrote: Thanks for the quick reply. So, coming back to my initial question, the behavior we observe is not correct and the document should get replicated? You're running an obsolete Sync Gateway (1.0). The current version is 1.0.2,

Re: SyncGateway : What should happen when a user gets access to a new channel with a continuous replication running?

2014-10-17 Thread Jakob Hoydis
Great thanks. I will give it a try. Jakob On Friday, October 17, 2014 3:01:50 PM UTC+2, Jakob Hoydis wrote: Hi, We have the following situation: - User 1 is running a continuous replication with CBLite on SyncGateway - There is a document 'A' which belongs to channel 'CHN_A'. The user does

Re: channel-based pull replication of document deletions

2014-09-18 Thread MikeL
. This is a dictionary where a channel name maps either to null (if the doc is currently in that channel), or to the sequence number at which the doc was removed from the channel. Also, what does the /db/_changes feed for the database look like? —Jens -- You received this message because you

Re: channel-based pull replication of document deletions

2014-09-18 Thread Jens Alfke
On Sep 18, 2014, at 1:31 PM, MikeL mikemm...@gmail.com wrote: So the _changes feed has the deletion entry: That looks correct to me. Was that from the admin port (:4985 by default)? If so, could you try it from the public port (:4984), authenticated as the user in question? Thanks! —Jens

sync gateway : remove channel ?

2014-08-15 Thread Thomas SALOMON
Hello, I am using couchbase mobile with sync gateway and I am wondering if it is possible de remove/delete a channel ? Indeed, I create channels attached to specific objects and when these objects are removed, I'd like to remove the corresponding channel. I am afraid that, with time, too many

Re: sync gateway : remove channel ?

2014-08-15 Thread Andrew Reslan
Channels are created by the sync function on sync_gateway, when new document revisions are written to a database. A channel will no longer exist (from a couchbase clients perspective) when all the documents that map to it are deleted. Andy -- You received this message because you

Re: Custom Authentication and Channel Mapping

2014-06-24 Thread Jens Alfke
On Jun 23, 2014, at 3:16 PM, Todd Freese to...@filmworkers.com wrote: Is there a REST admin call to get a list of all the SG users? I need to check to make sure a new username is unique. No, but you can call GET /db/_users/username and you'll get a 404 if the username is available. --Jens

Re: Custom Authentication and Channel Mapping

2014-06-24 Thread Phil Moss
document onto the channel for the room.) But I think you mean: how to make sure only chat-room owners can add members to the chat room? You can use the validation capability to reject documents http://developer.couchbase.com/mobile/develop/guides/sync-gateway/sync-function-api-guide/validation

Re: Custom Authentication and Channel Mapping

2014-06-24 Thread Jens Alfke
On Jun 24, 2014, at 9:25 AM, Phil Moss p...@entangledmedia.net wrote: These profile documents wouldn't replicate anywhere, just live on the server and grant access to channels when they're called. Is this solution possible? I'm not sure what the profile documents you refer to are; but you

Custom Authentication and Channel Mapping

2014-06-23 Thread Phil Moss
give people access to certain chat rooms without giving away user/channel information in the local mobile database? Right now I have a members property and a channel_id property in the CBL document just for testing. Documents are synced on the gateway with access(doc.members, ch- + doc.channel_id

Re: Custom Authentication and Channel Mapping

2014-06-23 Thread J. Chris Anderson
existing app server could set up the session and then send the session token back to the mobile app for use by Couchbase Lite. Also, if this can be done, how would I securely give people access to certain chat rooms without giving away user/channel information in the local mobile database

Re: Custom Authentication and Channel Mapping

2014-06-23 Thread Todd Freese
Good timing, I'm dealing with almost the exact issue myself. Question, when you create a user for SG, where is this user info stored? I'm using Couchbase behind SG. Is it stored in the couch base sync_gateway bucket? T -- You received this message because you are subscribed to the Google

Re: Custom Authentication and Channel Mapping

2014-06-23 Thread J. Chris Anderson
On Monday, June 23, 2014 1:29:20 PM UTC-7, Todd Freese wrote: Good timing, I'm dealing with almost the exact issue myself. Question, when you create a user for SG, where is this user info stored? I'm using Couchbase behind SG. Is it stored in the couch base sync_gateway bucket? Yes,

Re: Custom Authentication and Channel Mapping

2014-06-23 Thread Todd Freese
Lastly, Is there a REST admin call to get a list of all the SG users? I need to check to make sure a new username is unique. I tried curl -X GET http://127.0.0.1:4985/shotbotdb/_users but I get {error:not_found,reason:unknown URL}. Thanks! Todd -- You received this message because you are

Re: Custom Authentication and Channel Mapping

2014-06-23 Thread J. Chris Anderson
can see who the other members are. Our example apps do this, but it's possible to do things a different way (just don't put the meta-room document onto the channel for the room.) But I think you mean: how to make sure only chat-room owners can add members to the chat room? You can use

wildcard channel

2014-06-10 Thread Seung Chan Lim
If I want to a document to be replicated everywhere, am I correct in assuming that all I need to do is simply call channel(*) in my sync function? Is there anything else I need to do? I ask, because I tried that, but still getting forbidden from the sync gateway trying to access that document

Re: wildcard channel

2014-06-10 Thread J. Chris Anderson
On Tuesday, June 10, 2014 12:20:38 PM UTC-7, Seung Chan Lim wrote: If I want to a document to be replicated everywhere, am I correct in assuming that all I need to do is simply call channel(*) in my sync function? Is there anything else I need to do? I ask, because I tried

Re: wildcard channel

2014-06-10 Thread J. Chris Anderson
On Tuesday, June 10, 2014 1:06:47 PM UTC-7, J. Chris Anderson wrote: On Tuesday, June 10, 2014 12:20:38 PM UTC-7, Seung Chan Lim wrote: If I want to a document to be replicated everywhere, am I correct in assuming that all I need to do is simply call channel(*) in my sync function

Re: wildcard channel

2014-06-10 Thread Jens Alfke
On Jun 10, 2014, at 12:20 PM, Seung Chan Lim djs...@gmail.com wrote: If I want to a document to be replicated everywhere, am I correct in assuming that all I need to do is simply call channel(*) in my sync function? That should do it. Every user implicitly has access to that channel. I ask

Re: wildcard channel

2014-06-10 Thread Jens Alfke
On Jun 10, 2014, at 1:06 PM, J. Chris Anderson jch...@couchbase.com wrote: Documents are automatically routed to the * channel, so you just need to grant the current user access to the star channel something like this: function(doc){ requireUser(doc.user) access(doc.user, *) } Ack

Re: wildcard channel

2014-06-10 Thread Seung Chan Lim
javascript: wrote: If I want to a document to be replicated everywhere, am I correct in assuming that all I need to do is simply call channel(*) in my sync function? That should do it. Every user implicitly has access to that channel. I ask, because I tried that, but still getting forbidden

Re: wildcard channel

2014-06-10 Thread J. Chris Anderson
You can also use the REST API to give particular users access to the * channel http://developer.couchbase.com/mobile/develop/guides/sync-gateway/administering-sync-gateway/authorizing-users/index.html#accounts. In a real app you probably want to put your documents onto channels

Re: wildcard channel

2014-06-10 Thread Jens Alfke
On Jun 10, 2014, at 3:24 PM, J. Chris Anderson jch...@couchbase.com wrote: You can also use the REST API to give particular users access to the * channel. For the second time: You don't want to do this. Giving a user access to * means they can read every single doc in the database. --Jens

Re: wildcard channel

2014-06-10 Thread Jens Alfke
On Jun 10, 2014, at 3:18 PM, Seung Chan Lim djs...@gmail.com wrote: But then I switch to normal port I don't have permission (forbidden) to see those documents. Can you show that request too? What account are you authenticating as on the normal port? --Jens -- You received this message

Re: wildcard channel

2014-06-10 Thread Seung Chan Lim
I'm authenticating as a valid/normal user (i.e. not guest - no particular role) Here's what I get if I try to access the document through the Non-Admin port: http://localhost:4984/db/a73c9c3cbe6f416c833b1e7297424074 {error:Forbidden,reason:forbidden} On Tuesday, June 10, 2014 7:53:35 PM

  1   2   >