Updating a list with the user having read only permission

Posted: October 7, 2008 in Object Model, Permissions

If a user have only read permission for a list or a document library and if u want him to add or update item in a list then u can use

SPSecurity.RunWithElevatedPrivileges(delegate()
{
item.Update();
}
);

This method will give the user the permission to add or update the list.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s