Verbergen van ribbon in Sharepoint 2010

In Sharepoint 2010 is de handige ribbon aanwezig om acties te kunnen voltooien op de website. Voor de publieke website die ik momenteel aan het ontwikkelen ben is het niet nodig dat anonieme gebruikers deze ribbon krijgen te zien. Het past immers niet echt in de stijl van de website, anonieme gebruikers kunnen er niets mee, waardoor het alleen maar afleidt.

Gelukkig is er tegenwoordig een oplossing voor die out of the box kan worden gebruikt, namelijk het volgende stukje code:

<Sharepoint:SPSecurityTrimmedControl runat="server" Permissions="ManageLists">

Put Your Control Here

<SharePoint:SPSecurityTrimmedControl>

Uiteraard kan deze code voor veel meer dingen worden gebruikt dan alleen de ribbon. Zoals altijd, gebruik dit met mate!

Mogelijke waarden die kunnen worden gebruikt bij het attribuut Permissions zijn te vinden op deze MSDN pagina.

Voor de volledigheid, hier ook het overzicht dat momenteel op de pagina staat:

Member name Description
EmptyMask Available in SharePoint Online Has no permissions on the Web site. Not available through the user interface.
ViewListItems Available in SharePoint Online View items in lists, documents in document libraries, and view Web discussion comments.
AddListItems Available in SharePoint Online Add items to lists, add documents to document libraries, and add Web discussion comments.
EditListItems Available in SharePoint Online Edit items in lists, edit documents in document libraries, edit Web discussion comments in documents, and customize Web Part Pages in document libraries.
DeleteListItems Available in SharePoint Online Delete items from a list, documents from a document library, and Web discussion comments in documents.
ApproveItems Available in SharePoint Online Approve a minor version of a list item or document.
OpenItems Available in SharePoint Online View the source of documents with server-side file handlers.
ViewVersions Available in SharePoint Online View past versions of a list item or document.
DeleteVersions Available in SharePoint Online Delete past versions of a list item or document.
CancelCheckout Available in SharePoint Online Discard or check in a document which is checked out to another user.
ManagePersonalViews Available in SharePoint Online Create, change, and delete personal views of lists.
ManageLists Available in SharePoint Online Create and delete lists, add or remove columns in a list, and add or remove public views of a list.
ViewFormPages Available in SharePoint Online View forms, views, and application pages, and enumerate lists.
Open Available in SharePoint Online Allow users to open a Web site, list, or folder to access items inside that container.
ViewPages Available in SharePoint Online View pages in a Web site.
AddAndCustomizePages Available in SharePoint Online Add, change, or delete HTML pages or Web Part Pages, and edit the Web site using a SharePoint Foundation compatible editor.
ApplyThemeAndBorder Available in SharePoint Online Apply a theme or borders to the entire Web site.
ApplyStyleSheets Available in SharePoint Online Apply a style sheet (.css file) to the Web site.
ViewUsageData Available in SharePoint Online View reports on Web site usage.
CreateSSCSite Available in SharePoint Online Create a Web site using Self-Service Site Creation.
ManageSubwebs Available in SharePoint Online Create subsites such as team sites, Meeting Workspace sites, and Document Workspace sites.
CreateGroups Available in SharePoint Online Create a group of users that can be used anywhere within the site collection.
ManagePermissions Available in SharePoint Online Create and change permission levels on the Web site and assign permissions to users and groups.
BrowseDirectories Available in SharePoint Online Enumerate files and folders in a Web site using Microsoft Office SharePoint Designer 2007 and WebDAV interfaces.
BrowseUserInfo Available in SharePoint Online View information about users of the Web site.
AddDelPrivateWebParts Available in SharePoint Online Add or remove personal Web Parts on a Web Part Page.
UpdatePersonalWebParts Available in SharePoint Online Update Web Parts to display personalized information.
ManageWeb Available in SharePoint Online Grant the ability to perform all administration tasks for the Web site as well as manage content. Activate, deactivate, or edit properties of Web site scoped Features through the object model or through the user interface (UI). When granted on the root Web site of a site collection, activate, deactivate, or edit properties of site collection scoped Features through the object model. To browse to the Site Collection Features page and activate or deactivate site collection scoped Features through the UI, you must be a site collection administrator.
UseClientIntegration Available in SharePoint Online Use features that launch client applications; otherwise, users must work on documents locally and upload changes.
UseRemoteAPIs Available in SharePoint Online Use SOAP, WebDAV, or Microsoft Office SharePoint Designer 2007 interfaces to access the Web site.
ManageAlerts Available in SharePoint Online Manage alerts for all users of the Web site.
CreateAlerts Available in SharePoint Online Create e-mail alerts.
EditMyUserInfo Available in SharePoint Online Allows a user to change his or her user information, such as adding a picture.
EnumeratePermissions Available in SharePoint Online Enumerate permissions on the Web site, list, folder, document, or list item.
FullMask Available in SharePoint Online Has all permissions on the Web site. Not available through the user interface.

Share

comments powered by Disqus