Archive for the ‘Security’ Category

Add User To SharePoint Group Programmatically


Introduction: In this article I will describe that how to add Share point user to share point group programmatically. This will use below terms:- 1. AllowUnsafeUpdates: Before we update we will set AllowUnsafeUpdates to true. 2. SPGroup: We will create object sharepoint group in which we need to user. 3. AddUser: SPGroup.AddUser will add user […]

June 25, 2012 · Infoyen · 2 Comments
Tags: ,  · Posted in: General, MOSS, Security, SharePoint

Create group, permission and assign it programmatically


Introduction In this article I will describe that how to create Sharepoint group, permission and assign permission to group programmatically using feature. This will use below terms:- 1. SPGroup: We wll create sharepoint group. 2. RoleDefinition: We will create custom permission. 3. RoleAssignment: Assign custom permission to group.

June 24, 2012 · Infoyen · No Comments
Tags: ,  · Posted in: MOSS, Security, SharePoint

Get web collection count for read permission


Issue:- For one of requirement; I had to get subwebs and lists of current site for current user. To do so I just used “SPWeb.Web.Count”  and it works well for admin. But for reader it throws access denied exception. If we see in debug mode then error detail would be like below:- threw an exception […]

April 16, 2012 · Infoyen · No Comments
Tags: , , , , ,  · Posted in: MOSS, Security, SharePoint, Tips & Tricks

User Profiles in SharePoint Object Model


Introduction In this article I am going to explain you that How to use User Profiles and profile properties in Sharepoint Object model. In SharePoint 2007, a userid is uniquely identified by his/her username. The username is Tied to the membership provider that the site is configured to authenticate against. A user can also have […]

March 28, 2012 · Infoyen · 8 Comments
Tags: , , , , , , , , , , , , , ,  · Posted in: MOSS, Security, SharePoint

AllowUnsafeUpdates VS RunWithElevatedPrivileges


AllowUnsafeUpdates: If your code modifies Windows SharePoint Services data in some way, you may need to allow unsafe updates on the Web site, without requiring a security validation. You can do by setting the AllowUnsafeUpdates property. For detail click here AllowUnsafeUpdates RunWithElevatedPrivileges : There are certain object model calls model that require site-administration privileges. To […]

March 26, 2012 · Infoyen · No Comments
Tags: , , , ,  · Posted in: MOSS, Security, SharePoint

RunWithElevatedPrivileges


Introduction: In this article I am going to explain you that How to use RunWithElevatedPrivileges in sharepoint object model. RunWithElevatedPrivileges Executes the specified method with Full Control rights even if the user does not otherwise have Full Control.The next example shows the syntax that is required to define an anonymous method in the call to […]

March 26, 2012 · Infoyen · 2 Comments
Tags: , , , ,  · Posted in: MOSS, Security, SharePoint

SPWeb.AllowUnsafeUpdates


Introduction In this article I am going to explain you that How and when to use SPWeb.AllowUnsafeUpdates. SPWeb.AllowUnsafeUpdates : It Gets or sets a Boolean value that specifies whether to allow updates to the database as a result of a GET request or without requiring a security validation. Whenever your code modifies SharePoint data in […]

March 24, 2012 · Infoyen · One Comment
Tags: , , , , , ,  · Posted in: MOSS, Security, SharePoint


myworldmaps infoyen