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 OnlineHas no permissions on the Web site. Not available through the user interface.

ViewListItems

Available in SharePoint OnlineView items in lists, documents in document libraries, and view Web discussion comments.

AddListItems

Available in SharePoint OnlineAdd items to lists, add documents to document libraries, and add Web discussion comments.

EditListItems

Available in SharePoint OnlineEdit 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 OnlineDelete items from a list, documents from a document library, and Web discussion comments in documents.

ApproveItems

Available in SharePoint OnlineApprove a minor version of a list item or document.

OpenItems

Available in SharePoint OnlineView the source of documents with server-side file handlers.

ViewVersions

Available in SharePoint OnlineView past versions of a list item or document.

DeleteVersions

Available in SharePoint OnlineDelete past versions of a list item or document.

CancelCheckout

Available in SharePoint OnlineDiscard or check in a document which is checked out to another user.

ManagePersonalViews

Available in SharePoint OnlineCreate, change, and delete personal views of lists.

ManageLists

Available in SharePoint OnlineCreate and delete lists, add or remove columns in a list, and add or remove public views of a list.

ViewFormPages

Available in SharePoint OnlineView forms, views, and application pages, and enumerate lists.

Open

Available in SharePoint OnlineAllow users to open a Web site, list, or folder to access items inside that container.

ViewPages

Available in SharePoint OnlineView pages in a Web site.

AddAndCustomizePages

Available in SharePoint OnlineAdd, change, or delete HTML pages or Web Part Pages, and edit the Web site using a SharePoint Foundation–compatible editor.

ApplyThemeAndBorder

Available in SharePoint OnlineApply a theme or borders to the entire Web site.

ApplyStyleSheets

Available in SharePoint OnlineApply a style sheet (.css file) to the Web site.

ViewUsageData

Available in SharePoint OnlineView reports on Web site usage.

CreateSSCSite

Available in SharePoint OnlineCreate a Web site using Self-Service Site Creation.

ManageSubwebs

Available in SharePoint OnlineCreate subsites such as team sites, Meeting Workspace sites, and Document Workspace sites.

CreateGroups

Available in SharePoint OnlineCreate a group of users that can be used anywhere within the site collection.

ManagePermissions

Available in SharePoint OnlineCreate and change permission levels on the Web site and assign permissions to users and groups.

BrowseDirectories

Available in SharePoint OnlineEnumerate files and folders in a Web site using Microsoft Office SharePoint Designer 2007 and WebDAV interfaces.

BrowseUserInfo

Available in SharePoint OnlineView information about users of the Web site.

AddDelPrivateWebParts

Available in SharePoint OnlineAdd or remove personal Web Parts on a Web Part Page.

UpdatePersonalWebParts

Available in SharePoint OnlineUpdate Web Parts to display personalized information.

ManageWeb

Available in SharePoint OnlineGrant 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 OnlineUse features that launch client applications; otherwise, users must work on documents locally and upload changes.

UseRemoteAPIs

Available in SharePoint OnlineUse SOAP, WebDAV, or Microsoft Office SharePoint Designer 2007 interfaces to access the Web site.

ManageAlerts

Available in SharePoint OnlineManage alerts for all users of the Web site.

CreateAlerts

Available in SharePoint OnlineCreate e-mail alerts.

EditMyUserInfo

Available in SharePoint OnlineAllows a user to change his or her user information, such as adding a picture.

EnumeratePermissions

Available in SharePoint OnlineEnumerate permissions on the Web site, list, folder, document, or list item.

FullMask

Available in SharePoint OnlineHas all permissions on the Web site. Not available through the user interface.

comments powered by Disqus