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.....
did u check this
ReplyDeletehttp://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.
To assign permissions to a sharepoint group, use the SPGroup.Name in place of the user's loginName.
ReplyDeletehi i have a requirement, in that i should filter the items of a list based on creator and other requirement is to filter the items based on specific group.
ReplyDeletei have a requirement such that items of a list should be filtered based on creator of the list.and another requirement is to filter the items of a list based on sharePoint group
ReplyDelete