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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Bug Report: Manually uploading file to bucket without permissions still adds permissions #8250

Open
2 tasks done
BlackyWolf opened this issue Jun 10, 2024 · 2 comments
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@BlackyWolf
Copy link

BlackyWolf commented Jun 10, 2024

馃憻 Reproduction steps

  1. Ensure a bucket and team have been created and the team given create access to the bucket
  2. Register a user using the appwrite npm library
  3. Sign user in
  4. Add user to team manually through cloud.appwrite.io
  5. Use the appwrite npm library to upload a file to the bucket with update, read, and delete permissions specifically for that user ID
  6. Upload a file manually through cloud.appwrite.io without any permissions

I did manually upload the same file twice through cloud to see how appwrite would handle it, but I don't know if that would effect it.

馃憤 Expected behavior

The file added via user should be restricted to that user with the delete, update, and read permissions.
The manual file should not have any permissions on it whatsoever.

馃憥 Actual Behavior

The snippet below shows permissions have been added for the last user to upload a file via the npm library. In fact, I deleted the user to see if that would fix it and it did not, so a user with that ID doesn't exist anymore.

image

馃幉 Appwrite version

Appwrite Cloud

馃捇 Operating system

Windows

馃П Your Environment

Hosting: Cloud Appwrite 1.5.7
NPM: appwrite@^15.0.0
Framework: React@^18.2.0 w/ Vite@^5.2.0
IDE: VS Code 1.90

馃憖 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?

@BlackyWolf BlackyWolf added the bug Something isn't working label Jun 10, 2024
@stnguyen90
Copy link
Contributor

@BlackyWolf, thanks for creating this issue! 馃檹馃徏 What you're describing seems like the expected behavior as described by our docs:

If you create a resource using a Client SDK without explicit permissions, the creator will be granted read, update, and delete permissions on that resource by default.

If you don't want to grant the user permissions, you may pass an empty array.

Is there anything else you need or can this be closed?

@stnguyen90 stnguyen90 added the question Further information is requested label Jun 16, 2024
@stnguyen90 stnguyen90 self-assigned this Jun 16, 2024
@BlackyWolf
Copy link
Author

BlackyWolf commented Jun 16, 2024

I apologize for not being clear. I am manually uploading a file using the cloud.appwrite.io UI and it is being assigned a specific user's permissions from when I uploaded a file using a local react app. When I upload the file through the cloud admin UI I leave the permissions blank, so I'm trying to figure out how permissions are getting assigned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants