is it possible to make a document with permissions from Appwrite functions
- 0
- Databases
- Functions
- Flutter
databaseId: databaseId,
collectionId: collectionId,
documentId: userId,
data: {
'userId': userId,
'email': userEmail,
'createdAt': DateTime.now().toIso8601String(),
'lastLogin': DateTime.now().toIso8601String(),
'isActive': true,
},
permissions: [
Permission.read(
Role.user(userId)), // Only the user can read their document
Permission.update(
Role.user(userId)), // Only the user can update their document
Permission.delete(
Role.user(userId)), // Only the user can delete their document
],
);
when i add the permissions in the functions i get an error AppwriteException: user_unauthorized, Permissions must be one of: (any, guests) (401 but when i remove it works fine ,i have selected all 10 of the Scopes for database.
How are you setting up your appwrite client?
Recommended threads
- Weird permission failure
when creating an account I use following methods: ``` Future<void> register(String email, String password, String username) async { final user = await accoun...
- Flutter Android oAuth is no more working
I currently don't get the oAuth login to work in flutter android. it works on ios and on web. but when try to use it on Android, i get to the point where the ca...
- Function domain not available
Hello, even tho in docs you clearly describe that every function has its domain, I can not see it anywhere in any of my projects. How do I reveal the url of th...