Hi,
I have some custom Javascript, but I want to check the users Role in it, how can this be acheived?
Rgds
Chris
Hi,
I have some custom Javascript, but I want to check the users Role in it, how can this be acheived?
Rgds
Chris
Two possible ways...do a dump of users and roles in JSON to the page in which the JScript is running
OR use some ajax to talk to the back end and return a result. IMHO the easiest is dump a JSOn string of users and their roles to the page and read from there.
Rgds
Andrew
For anyone tha is interested what I've done is the following.
In my other Thread here I modified the theme _headerModuleList.tpl - I am passing a Bool value to this which is the gotten in the SugarView.php file. THis bool value is true is a user is a member of the Role in Quesiton. So then in the Smarty template I included this bool in the sugar_theme_gm_switch function and modified the style.js for the theme. So now when a user that is a memeber of a certain role changing the Grouped Tab the pages reloads and it get the new &max_tabs variable.
Quick question, can this style.js be put into the Custom Directory for themes?
Rgds
Chris
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks