Skip to content

🐛 Bug Report: Create document with role #106

@Faiyyaz

Description

@Faiyyaz

👟 Reproduction steps

When i try to create the document using the role of user id for users collection i am not able to create the user since it is giving permission error.

final document = await databases.createDocument(
        databaseId: 'XXX',
        collectionId: 'XXX',
        documentId: id,
        data: {
          'email': email,
          'id': id,
          'name': name,
          'createdAt': DateTime.now().millisecondsSinceEpoch,
          'updatedAt': DateTime.now().millisecondsSinceEpoch,
        },
        permissions: [
          Permission.create(Role.user(id)),
        ],
      );

👍 Expected behavior

It should create the user document using the role

👎 Actual Behavior

It is giving permission issue

🎲 Appwrite version

Version 1.0.x

💻 Operating system

MacOS

🧱 Your Environment

No

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions