function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
thintonthinton 

Determining user permission level

Hi,
 
Does anybody know how to query for a user's permission level based off of their userId? I need to write some code that is restricted to administrators only. Thanks.
DevAngelDevAngel
You can get the userrole and profile from the user object.
thintonthinton

DevAngel,

Thanks for replying. Profile was exactly what I was looking for. I had seen UserRole, but not Profile.

Thanks