Friday, July 29, 2011

Hiding Ribbon in SP2010

The new ribbon in SP2010 looks nice from a editors point of view. All web-parts seems controlled by the contextual ribbon.Using web-parts on a public website, like a discussion board etc....
The public website is fully skinned now how do we make only the editor to see the ribbon for page.
Answer is as follows :- place you Ribbon Div inside below tag and see the result

<sharepoint:spsecuritytrimmedcontrol permissions="”ManageWeb”" runat="”server”"> 
Control/Ribbon
</sharepoint:spsecuritytrimmedcontrol> 
 
this was for hiding Ribbon but with the help of this we can hide our control also.instead of div just place you control over there.

Permission used in above example is ManageLists we do have other permissions also as follows :-

AddAndCustomizePages
AddDelPrivateWebParts
AddListItems
ApplyStyleSheets
ApplyThemeAndBorder
ApproveItems
BrowseDirectories
BrowseUserInfo
CancelCheckout
CreateAlerts
CreateGroups
CreateSSCSite
DeleteListItems
DeleteVersions
EditListItems
EditMyUserInfo
EmptyMask
EnumeratePermissions
FullMask
ManageAlerts
ManageLists
ManagePermissions
ManagePersonalViews
ManageSubwebs
ManageWeb
Open
OpenItems
UpdatePersonalWebParts
UseClientIntegration
UseRemoteAPIs
ViewFormPages
ViewListItems
ViewPages
ViewUsageData
ViewVersions

No comments:

Post a Comment