If you support multiple user logins with different documents available, you need to have a separate database for each user. Couchbase Lite itself does not have any notion of permissions or access controls within a database.
Yes, this is one of the common ways that people get burned using purge. Purge just completely forgets about the document locally. The document won’t be downloaded again on the next replication, because it hasn’t changed since the last pull. The way pull works is that the client asks the server for documents that have changed since the last time it pulled, and then downloads them.
I understand what you’re trying to do, and it makes sense, but it’s not supported by CBL as it exists today. That’s largely because CBL’s replication model is based on CouchDB, which is a server and as such doesn’t really have a use for things like syncing and then forgetting and then re-syncing sets of documents. In the future we’re going to be extending CBL to handle some of these other replication workflows that are useful on mobile devices.
For now I’d suggest having two databases instead of using purge. (Also, does your app itself really need to handle multiple logins? Android itself has multi-user support, which I think will provide a separate data directory for the app depending on which user is logged in, so your app shouldn’t have to worry about it.)
—Jens