Answered by:
Restrict Acccess to ISV.config button by Privileges

Question
-
Wondering if it’s possible to restrict the ISV.config buttons by privileges! As per SDK, it is possible in SiteMap.xml. Not sure why this was not provided in ISV.config as an attribute?
Objective is to not show the ISV buttons if user does not hold certain privileges. Ex: Custom button should have the same characteristics Like “Assign To” button disappears when user’s does not have privilege for “Assign To”!!!
Sitemap has this. Why not ISV.config?
For Sitemap: SDK exposes a Schema attribute like following.
Do I have to resort to using Javascript to hide this button?Privilege
Specifies the privileges needed to display this subarea.
Valid values:
A comma-separated list that has no spaces, made up of these possible values:
All
AllowQuickCampaign
Append
AppendTo
Assign
Create
Delete
Read
Share
WriteString
No
<SubArea Id="nav_managekb" ResourceId="Homepage_KBManager"
Icon="/_imgs/ico_18_126.gif" Url="/cs/home_managekb.aspx"
Client="Web">
<Privilege Entity="kbarticle" Privilege="Read,Write,Create" />
</SubArea>
Technology EvangelistMonday, August 3, 2009 8:52 PM
Answers
-
Venkat,
Thanks for the pointer. Currently i have this done through Javascript by explicitlty making webservice calls to find the the user privileges. This is pain as we need to make a complex fetch XML request with multiple linked Entities only to get if the user has given privileges.
Even to get WHoAMI, we have to make a webservice call!!! too bad.. We should have at least the currently logged in userId returned by platform without making explicit calls. Such as through some global variables controlled by the browser session.
AFAIK, this is something the next version of the CRM might want to address by providing the support as much as it gives it to SiteMap. OR
Provide a Global property through Javascript (like IsOnlien() etc) that gives the array of pivileges of the currently logged-in user.
Regards,
Sagar
Technology Evangelist- Marked as answer by VidyaSagarCh Thursday, August 20, 2009 1:55 AM
Thursday, August 20, 2009 1:48 AM
All replies
-
Hi VidyaSagarCh,
Yes. You have to use JavaScript and hide those buttons manually. I know it is painful, but there is no way out as of now.
Regards,
Chinmay
http://metrix.blogspot.com- Proposed as answer by Chinmay Patel Monday, August 3, 2009 9:06 PM
- Marked as answer by DavidJennawayMVP, Moderator Friday, August 14, 2009 12:14 PM
- Unmarked as answer by VidyaSagarCh Thursday, August 20, 2009 1:39 AM
Monday, August 3, 2009 9:06 PM -
Hi Vidya,
if u coded the application using only javascript ,then it is good for Javascript.if it is Custom aspx page u have to write SDK code ,by getting userid
Thanks & Regards
VenkataPidikiti
VenkataPWednesday, August 5, 2009 12:29 PM -
Venkat,
Thanks for the pointer. Currently i have this done through Javascript by explicitlty making webservice calls to find the the user privileges. This is pain as we need to make a complex fetch XML request with multiple linked Entities only to get if the user has given privileges.
Even to get WHoAMI, we have to make a webservice call!!! too bad.. We should have at least the currently logged in userId returned by platform without making explicit calls. Such as through some global variables controlled by the browser session.
AFAIK, this is something the next version of the CRM might want to address by providing the support as much as it gives it to SiteMap. OR
Provide a Global property through Javascript (like IsOnlien() etc) that gives the array of pivileges of the currently logged-in user.
Regards,
Sagar
Technology Evangelist- Marked as answer by VidyaSagarCh Thursday, August 20, 2009 1:55 AM
Thursday, August 20, 2009 1:48 AM