im trying to subscribe only to user related documents. Document security is enabled. But I get any updates.
I recive also documents from other user
nextjs:
const { client } = getClientSideServices();
return client.subscribe(
`databases.${appwriteConfig.databaseId}.collections.${collectionId}.documents`,
(response) => {
console.log('Events get for :', collectionId, response);
callback(response);
}
);
and
export function getClientSideServices() {
const client = new Client()
.setEndpoint(appwriteConfig.endpoint)
.setProject(appwriteConfig.projectId);
const sessionCookie = getCookie('session');
if (sessionCookie) {
console.log('Session-Cookie found, last Session:', sessionCookie.substring(0, 10) + '...');
client.setSession(sessionCookie);
} else {
console.warn('No Session-Cookie found!');
}
return {
account: new Account(client),
databases: new Databases(client),
storage: new Storage(client),
teams: new Teams(client),
client,
};
}
permissions on collection settings:
permissions on document settings:
I followed also this tutorial. It doesnt helped
I checked also dev tools on browser. the user is null. Is that the reason? If yes, how can we fix it?
Recommended threads
- MongoDb Database Breaks integer[] & bigi...
I've got a table with the below column created. When I try to insert the value `[-3408048000]` into it, the dart sdk cloud function call is successful (no error...
- Error can not create `tablesdb` event wi...
When i'm trying to add an event with `tablesdb` i get an error message My event value: `tablesdb.mtg-decklist-dev.tables.queue_parsing.rows.*.create` Same err...
- Delete on cascade from Cloud Function
I'm writing a Python function that deletes a user's main row from a table in my database. This row has relationships with other tables that use cascade deletion...