O'Reilly logo

Sams Teach Yourself SharePoint® 2010 Development in 24 Hours by Vinu Santhakumari, Manpreet Singh, Sohail Sayed

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the SharePoint Security Object Model

SharePoint enables you to do everything that you can do in security through the user interface also through the SharePoint object model. Table 17.1 lists the various classes and objects related to security.

Table 17.1. Class and Objects for SharePoint Security Object Model

Image

The following code illustrates creation of a new permission level:

// create a new permission levelSPRoleDefinition roleDefinition = new SPRoleDefinition();// assign some permissions to the new permission levelroleDefinition.BasePermissions =SPBasePermissions.AddListItems |SPBasePermissions.BrowseDirectories |SPBasePermissions.DeleteListItems ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required