CBL: iOS : 2.8.0-114, Android - 2.8.0-262
- Steps to Reproduce: *
1. Create a list in todo app
2. Create doc in the list
3. Share doc to user2.
4. Verify user2 can view the doc and list shared by user1
5. Now user1 should unshare the list to user2
6. Verify user2 cannot view the list
*Actual Result: * : As soon as user unshare, replicator still show idle and list does not disappear from user2.
Tried logout and login, though it has db locally it sync delta from sync gateway which did not made the list disappear . User2 can view the list which unshared by user1
Tried removed the todo app which deletes local DB and resintalled the app and that made it disappear the list as it synced from sync gateway
Expected Result: As soon as user1 unshare the list, it should get disappear from user1.
CBL LOGS: iOS logs https://gist.github.com/sridevi-15/f2bf8530f319caacf124c92168818a21
*Reproducing case : *Test with todo app
Also I tested functionally adding following logic on functional test :
1. Create 2 docs in CBL with channel A, B
2. Create user in SGW with channel A, B.
3. push_pull replicate to SGW
4. remove doc A from channel A
5. Remove doc B from channel A , B
6. continue push_pull replication
7. Verify user can only access doc A, but not doc B on SGW
8. Added this additional logic to current test:
verify user on CBL cannot access doc B
Right now user can access doc A and doc B
It is seen on all platforms.
AssertionError: user on cbl still able to access the doc even after unshare assert 'cbl_1' not in ['cbl_1', 'cbl_0']
- Verify user can only access doc A, but not doc B on CBL side too
cbl_doc_ids = db.getDocIds(cbl_db)
> assert cbl_ids not in cbl_doc_ids, "user on cbl still able to access the doc even after unshare"
E AssertionError: user on cbl still able to access the doc even after unshare
E assert 'cbl_1' not in ['cbl_1', 'cbl_0']