Hello guys !
I have a problem with a feature that i want to do : create a cloud function that return a boolean true/false if the current User is Admin or not.
- Gets all Roles in the database (WORK Fine) (But canāt access to Users relation from Roles)
- Canāt get the current user and his role list to check if he has the admin roleā¦
I canāt find any information in the documentation, how i can retrieve the user and his roles ?
I can see this object ID in cloud function logs, but canāt retrieve it.
I tried : Use Moralis SDK Moralis.User.current(); (return undefined), Roile.getUsers() (return undefined)
request.user (return undefined)
The user is correctly connected on my dapp before call cloud function : Moralis.User.current() return the current user on my dapp no problem.
Some one can help me plz ?