Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Bug Report: permissions on creating a collection #5682

Open
2 tasks done
Mahmoudgalalz opened this issue Jun 9, 2023 · 1 comment
Open
2 tasks done

🐛 Bug Report: permissions on creating a collection #5682

Mahmoudgalalz opened this issue Jun 9, 2023 · 1 comment
Assignees
Labels
bug Something isn't working product / cloud Issues found only on Appwrite Cloud

Comments

@Mahmoudgalalz
Copy link

👟 Reproduction steps

I'm trying to create a collection with permission I used the steps provided on the server-side sdk Node.js

It doesn't accept when I do add permissions when creating, it doesn't create the collection

so I tried the update after creating it, it still doesn't get the permissions

async function CreateCollection(collectionId,databaseOject,type,userid){
  try{
    const res = await databaseOject.createCollection(
      '647d4258936253967753'
      ,collectionId
      ,type)
    return res
  }
  catch(err){
    return err;
  }
}
async function UpdatePermissions(collectionId,databaseOject,type,userid){
  try{
    const res = await databaseOject.updateCollection(
      '647d4258936253967753',
      collectionId,
      type,
      [
        Permission.create(Role.user(userid))
      ]
    )
  }
  catch(err){
    return err;
  }
}

👍 Expected behavior

it should get permitted

👎 Actual Behavior

it doesn't

🎲 Appwrite version

Appwrite Cloud

💻 Operating system

MacOS

🧱 Your Environment

No response

👀 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?

@joeyouss
Copy link

Hi @Mahmoudgalalz , checking in to know if this is resolved now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working product / cloud Issues found only on Appwrite Cloud
Projects
None yet
Development

No branches or pull requests

2 participants