SharePoint 2007 allows item level permissions. The is the big change in security trimming from SharePoint 2003. It's really very good and useful in many scenarios like when an item is belongs to others or task assigned to some other person then users can't see other's tasks or they can't edit other's tasks etc.. item level permissions are really good and useful.
Here is a small code, to set specific permissions to a user for a list item.
The below is the exaple from my SharePoint custom workflow to customize the task list.
System.Collections.Specialized.
HybridDictionary taskPermissions = new System.Collections.Specialized.HybridDictionary();
taskPermissions[workflowProperties.Originator] = SPRoleType.Administrator;
taskPermissions[taskApprover] = SPRoleType.Administrator;
taskitem.SpecialPermissions = taskPermissions;
taskitem is the task list item. Hope this helps.....
Monday, April 27, 2009
How to give specific permissions to a list item through C# to a user
Posted by
Praveen
at
11:31 AM
Related Posts : C#,
item level security,
Moss,
SharePoint,
Sharepoint workflow
Labels:
C#,
item level security,
Moss,
SharePoint,
Sharepoint workflow
Subscribe to:
Post Comments (Atom)





1 comments:
did u check this
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.workflowactions.createtask.specialpermissions.aspx
Remarks
Specifying per-item access control list (ACL) rights is resource intensive and may negatively impact workflow performance.
Post a Comment