1 )
- Req : Post ,
- action : creates a user in the permit directory
- url : https://asnvuyznngsplkniggui.supabase.co/functions/v1/createUser
- Body:
{
id : "user id that will be used to uniquely identify the user"
defaultRole : "the default role that the users will be assigned like Admin or Employee or Viewer",
tenant : "the tenant under which the user will be added",
}
2 )
- Req : Post ,
- action : checks for user permissions in permit
- url : https://asnvuyznngsplkniggui.supabase.co/functions/v1/check-permission,
- Body :
{ user : "user id that will be used to uniquely identify the user", action: "operation which the user wants to perform", resource: { type: "type or resource name", teanant : "tenant name under which the user exists " } context: "extra information" }
- example :