SharePoint SPBasePermissions Enumeration

When I presented my session on Developing Custom Actions within SharePoint at the Boston SharePoint Saturday conference, I had mentioned a link for a listing of SPBasePermissions that is on MSDN, within the WSS 3.0 SDK, for use with the Rights attribute within the CustomAction element. This attribute defines what permissions are required for the Custom Action to be visible to users.

That link can be found here: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spbasepermissions.aspx

For others reference, and my own personal reference, I have a copy of this listing of SPBasePermissions here.

Member Name

Description

AddAndCustomizePages

Add, change, or delete HTML pages or Web Part Pages, and edit the Web site using a Windows SharePoint Services–compatible editor.

AddDelPrivateWebParts

Add or remove personal Web Parts on a Web Part Page.

AddListItems

Add items to lists, add documents to document libraries, and add Web discussion comments.

ApplyStyleSheets

Apply a style sheet (.css file) to the Web site.

ApplyThemeAndBorder

Apply a theme or borders to the entire Web site.

ApproveItems

Approve a minor version of a list item or document.

BrowseDirectories

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

BrowseUserInfo

View information about users of the Web site.

CancelCheckout

Discard or check in a document which is checked out to another user.

CreateAlerts

Create e-mail alerts.

CreateGroups

Create a group of users that can be used anywhere within the site collection.

CreateSSCSite

Create a Web site using Self-Service Site Creation.

DeleteListItems

Delete items from a list, documents from a document library, and Web discussion comments in documents.

DeleteVersions

Delete past versions of a list item or document.

EditListItems

Edit items in lists, edit documents in document libraries, edit Web discussion comments in documents, and customize Web Part Pages in document libraries.

EditMyUserInfo

Allows a user to change his or her user information, such as adding a picture.

EmptyMask

Has no permissions on the Web site. Not available through the user interface.

EnumeratePermissions

Enumerate permissions on the Web site, list, folder, document, or list item.

FullMask

Has all permissions on the Web site. Not available through the user interface.

ManageAlerts

Manage alerts for all users of the Web site.

ManageLists

Create and delete lists, add or remove columns in a list, and add or remove public views of a list.

ManagePermissions

Create and change permission levels on the Web site and assign permissions to users and groups.

ManagePersonalViews

Create, change, and delete personal views of lists.

ManageSubwebs

Create subsites such as team sites, Meeting Workspace sites, and Document Workspace sites. 

ManageWeb

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.

Open

Allow users to open a Web site, list, or folder to access items inside that container.

OpenItems

View the source of documents with server-side file handlers.

UpdatePersonalWebParts

Update Web Parts to display personalized information.

UseClientIntegration

Use features that launch client applications; otherwise, users must work on documents locally and upload changes. 

UseRemoteAPIs

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

ViewFormPages

View forms, views, and application pages, and enumerate lists.

ViewListItems

View items in lists, documents in document libraries, and view Web discussion comments.

ViewPages

View pages in a Web site.

ViewUsageData

View reports on Web site usage.

ViewVersions

View past versions of a list item or document.

 

Getting the out of a SharePoint List

I was working recently on a project for a client, to build a feature that will create several list templates, content types, and instances of those lists. To do so, I used a great new utility that can be found on CodePlex, written by Jeremy Thake and Rich Finn, that will handle this for you. Better than the SharePoint Solution Generator that ships with VSeWSS (Visual Studio extensions for Windows SharePoint Services).
I used SPSource (the above mentioned program) to extract the content types, list templates, and list instances with ease, just needing a few minor tweaks, but I also had a different issue. I needed to populate those list instances with the data that currently existed within those lists. Jeremy Thake had pointed out that this could be done easily with PowerShell, but there is also another method that works easily enough, without requiring code.
To do so, go to your list which contains the data, and then go into the settings for that list, and save the list as a template, including the content.
Once you have created the list template, go to the list template library, and download the STP file that was created. Now, here is the trick, rename that file from Listname.stp to Listname.stp.cab. STP files are nothing more than cabinet files.
From: image
To: image
Once it has been renamed, open the cabinet file in your favorite compression utility, and open the Manifest.XML file that is inside it in your favorite XML editor. SharePoint Designer works great for this, as there is a quick utility to clean up the XML off of your right-click context menu to Reformat XML.
image
Once you have a nice clean view, do a search for <Data>, and you will then see the <Data> which you can then paste into your ListInstance element within your solution, and you have your data rows from your list, which will be added into the list when the list instance is created.
Copy everything within the <Data> element, including the <Data> tags, starting here (see below), and you should be good to go.
image
I generally trim off all of the fields that are not needed, and just keep my fields which I am using, for example, in the above, just trimming out everything but my fields. Which should generally all appear at the top of the <Row> element, as shown below.
image
All of the system fields will be generated automatically, and you do not run the risk of trying to push data into a list that is not supported, such as Created By field authors not being in the sites or farms where these are deployed to, or specifying the Attachment when the resulting list does not support them, you may receive an error on feature activation.
I am eventually planning to write a PowerShell script, or an executable to take care of this, and when I do, I will post about it here, and publish it to our CodePlex site.

“SharePoints” for the week of April 26th, 2009

Finally, I am on vacation, but wanted to share a few tidbits of information this week from the Microsoft world that should be of interest to my readers.

MOSS 2007 and WSS 3.0 Service Pack 2 Released on 4/28/09
That is correct, the next service pack was released for SharePoint, with many updates and fixes and updates in the ways of performance, compatibility, and additional functionality. There are several pages at Microsoft for this information, but Joel Oleson has put together the best post I have seen so far about aggregating information for WSS SP2, so I will send you over there for download links and other information: WSS & MOSS SP2 is Available – 5 No Brainer Reasons to Install

MOSS 2007 and WSS 3.0 SDK 1.5 Now Available
The next release of the MOSS and WSS SDKs have been released! Here are links to both the online versions and the downloadable CHM versions.

Online Versions
Office SharePoint Server 2007 SDK
WSS 3.0 SDK

Downloadable CHM Versions
Office SharePoint Server 2007 SDK
WSS 3.0 SDK

Windows 7 RC Now Available
And finally to end my “SharePoints” for this week, Windows 7 Release Candidate is now available through MSDN.

Hope you have found these useful! Back to vacation for me…