\n```","author":{"@type":"Person","name":"RangerDev"},"datePublished":"2023-05-19T15:36:26.703Z","url":"https://appwrite.io/threads/1109142207677595699#message-1109142532849405965"},{"@type":"Comment","text":"here are my perms","author":{"@type":"Person","name":"RangerDev"},"datePublished":"2023-05-19T15:36:37.253Z","url":"https://appwrite.io/threads/1109142207677595699#message-1109142577099321477"},{"@type":"Comment","text":"(No text)","author":{"@type":"Person","name":"RangerDev"},"datePublished":"2023-05-19T15:36:53.782Z","url":"https://appwrite.io/threads/1109142207677595699#message-1109142646426980445"},{"@type":"Comment","text":"I mean in the collection settings?","author":{"@type":"Person","name":"Binyamin"},"datePublished":"2023-05-19T15:37:01.680Z","url":"https://appwrite.io/threads/1109142207677595699#message-1109142679553581077"},{"@type":"Comment","text":"Good","author":{"@type":"Person","name":"Binyamin"},"datePublished":"2023-05-19T15:37:09.463Z","url":"https://appwrite.io/threads/1109142207677595699#message-1109142712197857392"},{"@type":"Comment","text":"Now you need to add some way for use to create document\nEither by allow the `create` permission or inside a cloud-function","author":{"@type":"Person","name":"Binyamin"},"datePublished":"2023-05-19T15:37:49.474Z","url":"https://appwrite.io/threads/1109142207677595699#message-1109142880016146493"},{"@type":"Comment","text":"What do you mean?","author":{"@type":"Person","name":"RangerDev"},"datePublished":"2023-05-19T15:38:02.698Z","url":"https://appwrite.io/threads/1109142207677595699#message-1109142935481614406"},{"@type":"Comment","text":"Here you've let `Any` to `read`\nRight?","author":{"@type":"Person","name":"Binyamin"},"datePublished":"2023-05-19T15:38:22.718Z","url":"https://appwrite.io/threads/1109142207677595699#message-1109143019451588619"},{"@type":"Comment","text":"like this","author":{"@type":"Person","name":"RangerDev"},"datePublished":"2023-05-19T15:38:34.816Z","url":"https://appwrite.io/threads/1109142207677595699#message-1109143070194286753"},{"@type":"Comment","text":"Yes","author":{"@type":"Person","name":"Binyamin"},"datePublished":"2023-05-19T15:38:41.285Z","url":"https://appwrite.io/threads/1109142207677595699#message-1109143097327226910"},{"@type":"Comment","text":"oh","author":{"@type":"Person","name":"RangerDev"},"datePublished":"2023-05-19T15:38:43.600Z","url":"https://appwrite.io/threads/1109142207677595699#message-1109143107037036647"},{"@type":"Comment","text":"Exactly","author":{"@type":"Person","name":"Binyamin"},"datePublished":"2023-05-19T15:38:45.646Z","url":"https://appwrite.io/threads/1109142207677595699#message-1109143115618598922"},{"@type":"Comment","text":"let me try now","author":{"@type":"Person","name":"RangerDev"},"datePublished":"2023-05-19T15:38:45.884Z","url":"https://appwrite.io/threads/1109142207677595699#message-1109143116616831037"},{"@type":"Comment","text":"do I have it do the same for the buckets?","author":{"@type":"Person","name":"RangerDev"},"datePublished":"2023-05-19T15:39:25.749Z","url":"https://appwrite.io/threads/1109142207677595699#message-1109143283822776391"},{"@type":"Comment","text":"why is it giving me the error again? \ntps://cloud.appwrite.io/v1/databases/646538e35dd17306c589/collections/646538eeeface7a4cd39/documents 401\n(anonymous) @ appwrite.209ebd24.js:1\nF @ appwrite.209ebd24.js:1\n(anonymous) @ appwrite.209ebd24.js:1\n(anonymous) @ appwrite.209ebd24.js:1\np @ appwrite.209ebd24.js:1\ncall @ appwrite.209ebd24.js:1\n(anonymous) @ appwrite.209ebd24.js:1\n(anonymous) @ appwrite.209ebd24.js:1\np @ appwrite.209ebd24.js:1\ncreateDocument @ appwrite.209ebd24.js:1\nI @ create.f48802b9.js:1\ncreate.f48802b9.js:1 AppwriteException: Permissions must be one of: (any, users, user:64664a3a1e3479d80c32, user:64664a3a1e3479d80c32/unverified, users/unverified)\n at Pe. (https://pitchfork.vercel.app/_astro/appwrite.209ebd24.js:1:19652)\n at Generator.next ()\n at c (https://pitchfork.vercel.app/_astro/appwrite.209ebd24.js:1:14540)","author":{"@type":"Person","name":"RangerDev"},"datePublished":"2023-05-19T15:40:18.841Z","url":"https://appwrite.io/threads/1109142207677595699#message-1109143506506743910"},{"@type":"Comment","text":"Can you remove the `any` and try?","author":{"@type":"Person","name":"Binyamin"},"datePublished":"2023-05-19T15:42:47.063Z","url":"https://appwrite.io/threads/1109142207677595699#message-1109144128194887795"},{"@type":"Comment","text":"Yes","author":{"@type":"Person","name":"Binyamin"},"datePublished":"2023-05-19T15:42:52.660Z","url":"https://appwrite.io/threads/1109142207677595699#message-1109144151670390794"},{"@type":"Comment","text":"From the code or the website","author":{"@type":"Person","name":"RangerDev"},"datePublished":"2023-05-19T15:43:09.025Z","url":"https://appwrite.io/threads/1109142207677595699#message-1109144220310179943"},{"@type":"Comment","text":"From the console\n\nBut, Sorry \nIn this code \n```typescript\n [\n Permission.read(Role.any()),\n Permission.write(Role.user(userID)),\n Permission.delete(Role.user(userID)),\n Permission.update(Role.user(userID)),\n Permission.delete(Role.team(\"Owner\")),\n Permission.update(Role.team(\"Owner\")),\n Permission.read(Role.team(\"Owner\")),\n Permission.delete(Role.team(\"Admin\")),\n Permission.update(Role.team(\"Admin\")),\n\n ]\n```\nYou can't add these line\n```javascript\n Permission.delete(Role.team(\"Owner\")),\n Permission.update(Role.team(\"Owner\")),\n Permission.read(Role.team(\"Owner\")),\n Permission.delete(Role.team(\"Admin\")),\n Permission.update(Role.team(\"Admin\")),\n```","author":{"@type":"Person","name":"Binyamin"},"datePublished":"2023-05-19T15:45:21.388Z","url":"https://appwrite.io/threads/1109142207677595699#message-1109144775480848414"},{"@type":"Comment","text":"When you're running against Appwrite from a client side SDK (like Web) you can't set any permission that you don't own. For example in your use case these are the only one you can set from the client side\n```\n- any, users, user:64664a3a1e3479d80c32,user:64664a3a1e3479d80c32/unverified, users/unverified\n\nAppwriteException: Permissions must be one of: (any, users, user:64664a3a1e3479d80c32, user:64664a3a1e3479d80c32/unverified, users/unverified)\n```","author":{"@type":"Person","name":"Binyamin"},"datePublished":"2023-05-19T15:46:36.278Z","url":"https://appwrite.io/threads/1109142207677595699#message-1109145089592270899"},{"@type":"Comment","text":"If you do want to be able to add and declare as many permissions as you like \nYou can do so, but, for that you'll need to use Appwrite function + Server side SDK","author":{"@type":"Person","name":"Binyamin"},"datePublished":"2023-05-19T15:47:17.224Z","url":"https://appwrite.io/threads/1109142207677595699#message-1109145261332234250"},{"@type":"Comment","text":"Hope this makes sense","author":{"@type":"Person","name":"Binyamin"},"datePublished":"2023-05-19T15:47:21.917Z","url":"https://appwrite.io/threads/1109142207677595699#message-1109145281016107028"}]}}
Skip to content
Back
ResolvedToolsDatabasesWebSelf Hosted

[SOLVED] Cannot create document

Votes

0

Replies

24

Participants

Unknown

Messages

25

RangerDevOriginal post

Rank 3: Container

Binyamin
RangerDev

Rank 3: Container

RangerDev

Rank 3: Container

RangerDev

Rank 3: Container

RangerDev

Rank 3: Container

Binyamin
Binyamin
Binyamin
RangerDev

Rank 3: Container

Binyamin
RangerDev

Rank 3: Container

Binyamin
RangerDev

Rank 3: Container

Binyamin
RangerDev

Rank 3: Container

RangerDev

Rank 3: Container

RangerDev

Rank 3: Container

Binyamin
Binyamin
RangerDev

Rank 3: Container

Binyamin
Binyamin
Binyamin
Binyamin

Join the discussion

Reply to this thread by joining our Discord.

Reply on Discord