LighthouseMike | 2023-01-18 18:01:05 UTC | #1
Good afternoon, :smiley:
I'm sure this is an easy one, but I'm just having trouble finding it in the JavaScript SDK docs: how do I check if the user has permission to do something? I'm guessing it's either the Users API or the Authorization API... somewhere. Or maybe I'm missing an "expand" in getUsersMe?
Eos_Rios | 2023-01-18 19:20:55 UTC | #2
1st person;
GET /api/v2/authorization/subjects/me
3rd person; GET /api/v2/authorization/subjects/{subjectId}
Could also do GET /api/v2/users/me?expand=authorization
But that's a lot more data if you don't need all info about who they are.
LighthouseMike | 2023-01-18 19:23:18 UTC | #3
Thank you very much. :smiley:
Yeah, I would have never guessed "subjects" when talking about user permissions... funny thing tho, I was right - it was in users and in authorizations. :laughing: Anyway, like I said, thank you.
system | 2023-02-18 19:24:08 UTC | #4
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 18042