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.....
No comments:
Post a Comment