we recently decided to refactor coding which uses hardcoded Ids and Names for permission checks on profiles. We want to use custom permissions, which then can be added to permission sets and therefore make it easier to fine tune the permission scheme. And it's pretty easy to use in Visualforce and APEX as well.
However we kind of ran into a road block with javascript coding stored in static resources. We cannot use the $Permission.[Permissionname]
here, like we could in javascript of visualforce pages. At least we guess so, because it's not working. :-)
Is there a way to access custom permissions of the user from within Javascript Coding which is stored in static resources?
I am aware, that there are ways to get some system information like:
var userInfo = sforce.connection.getUserInfo();
Is there a similar thing to get the custom permissions?