Back

Database permission issue

  • 0
  • Self Hosted
  • Databases
  • Web
Incbom
24 Apr, 2024, 21:40

Hello,

I keep getting this error: AppwriteException: The current user is not authorized to perform the requested action. However, I am given full access to the collection and I gave the All access to view the collections. I am now unsure how this can be an issue when I set permissions up correctly.

TL;DR
Developers are having trouble accessing a database document even though they have given full access permissions. The error message states that the current user is not authorized to perform the action. This issue is occurring while troubleshooting for allowing only logged-in users to view the document. Solution: Check the database permissions settings and make sure that the 'All' access level includes the necessary permissions to view the collections. Double-check the user authentication status to ensure that the user is indeed logged in.
Incbom
24 Apr, 2024, 21:44
TypeScript
const promise = databases.getDocument('66297275000fdd77a26f', '662972bf00173ab3d363', '6629781f002d752eb79f')
    promise.then((response) => {
        return response;
    }, (error) => {
        console.log(error)
});```

code
Incbom
24 Apr, 2024, 21:44

I idealy want it so only logged in users can view it, however doing this for troubleshooting

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more