Currently, only $Browser and $Locale are available as global value providers.

Are there any ideas how to check profile and custom permissions of current user without running SOQL query in @auraenabled apex? I had a look into $A.* but no available helper javascript functions that seems can verify profile details.

  • What would be your use case for this? – Robert Sussland Apr 8 '15 at 20:38
  • For example, there are two tabs on the page: View and Create. Create tab should be shown for users, who have Create custom permission. Or permission to see exclusive data(like we can use {!$Permission.canSeeExecutiveData} on VF page ) – Natallia Apr 8 '15 at 21:23
  • 1
    Well, you can query that with a call to an auraenabled apex method, or I guess this is a feature request to have built in js methods that make this call, but in both cases the data is on the server, not on the client. In the situation of visualforce, it also runs on the server so the data is right there and the VF permission call is possible. – Robert Sussland Apr 8 '15 at 22:10
  • 2
    The only way to make it available on the client would be to serialize down all the permissions on page load. Prohibitively expensive, so you'll need to do what Robert Sussland suggested. – Kris Gray Apr 27 '15 at 19:33

No, the more value providers that are added, the more weight we add to every request. Serializing down all the permissions would be crazy expensive as well.

You'll need to provide that information to your component from the server yourself, sorry.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.