Determining a user's access before making a reques...
# support
t
Hi there, is there a built-in way to determine if a user has access to a specific resource via an access policy before they request for the resource? For instance, I have two types of users, an RN, and an Operations Person, the RN is able to create orders, and the Operations Person should not be able to create orders. I need to display two different UI views based on their access level. My assumption is that I need to leverage
ProjectMembership
to check the specific access policies the user has attached. I don't see a built-in function within the SDK to determine if a user has a specific policy.
r
At present, no - but you are not the first person to request this! Follow along here for updates: https://github.com/medplum/medplum/issues/2126
t
Excellent, thank you! Would you recommend the approach I outlined? Checking the
ProjectMembership
manually?
r
I realize it's not that ergonomic, but functionally that sounds sensible
156 Views