#Missing "execute" permission for role "users".
33 messages · Page 1 of 1 (latest)
It's weird as any and guests are not even in the execute access list.
i know its weird, i updated from the 1.2x to 1.3x but i have other instance running on 1.3 from scratch with same issue
The only idea come to mind is double check all parameters and maybe try to remove to rule, save, then readd it.
you say guest and any are not in the execute list, but i can see them on my instance, which is weird
I meant they not in the Added list
if i add any and guest, i got this other error lool
What function do you run?
im running a nodejs function that merge 2 collections data, since relationship still don't response anything
so im merging the data via a function
Okay, I meant what function you run to execute your function?
aaah ok
the first part goes well if i add any and guest to the permissions scope, the issue is on the getExecution
Looking into it
thanks
🤔🤔
It's interesting and we need confirmation for that from an Appwrite core
member.
When you give a Role access to execute function, it's only for execute it.
Then the other two client-side functions listExecutions and getExecution are available only to the user who created the function.
And guest can't be identified so he can never get the status of an executions.
ooh i see, and since im creating the function from the console, not the current logged in user on the dashboard that i have, so it never get the other 2 client side function permissions
If it is true, then
To solve it you can change your function execution code to sync.
Exactly, It seems like that.
let me try with the async
it worked like this, which is weird, since the las argument was supposed to turn async on or off,
You can see that in the database if guest runs the function then no-one ger permission to read it
Actually it's good
Because when you passed the argument false (which is the default behavior) then you'll get back the execution status in sync
It would be nice if they would add an option for anonymous users, so you be able to run function in async.
yes, din't know the thing that user that create the function should execute it, it can run with guess, but so far i can run it with guest
so for now il use it like this, thanks for the big help
what do you mean?
Hi guys, I have set the async flag to false like:
session.then(function (response) {
console.log(response); // Success
const functions = new Functions(client);
const promise = functions.createExecution('64e459b015c232d2e51d',undefined, false);
promise.then(function (response) {
console.log(response); // Success
}, function (error) {
console.log(error); // Failure
});
}, function (error) {
console.log(error); // Failure
});
But I'm still getting errors:
AppwriteException: Missing "execute" permission for role "user:007". Only "["any","guests"]" scopes are allowed and "["users","user:007"]" was given.
at Client.<anonymous> (file:///D:/repo/test_appwrite/node_modules/appwrite/dist/esm/sdk.js:391:27)
at Generator.next (<anonymous>)
at fulfilled (file:///D:/repo/test_appwrite/node_modules/appwrite/dist/esm/sdk.js:22:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 401,
type: 'user_unauthorized',
response: {
message: 'Missing "execute" permission for role "user:007". Only "["any","guests"]" scopes are allowed and "["users","user:007"]" was given.',
code: 401,
type: 'user_unauthorized',
version: '1.3.7'
}
}
Anything else I can try?
Did you read this thread?
Also, did you have tried this?
If that doesn't solves your issue, please, create another post