Hi,
I am trying to explicitly grant permission to a user in a custom list.
I had checked the SPRoleAssignment property.
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.sproleassignment.aspx
However, will the role assignment work, if the loginname is only passed?
Below is the code which I mean:
//CurrentListItem is the SPListItem data
SPRoleDefinition oSPRoleDefinition = oSPWeb.RoleDefinitions[Custom Role];
SPRoleAssignment oSPRoleAssignmentuser = new SPRoleAssignment("domain\userid","","","");
oSPRoleAssignmentUser.RoleDefinitionBindings.Add(oSPRoleDefinition);
CurrentListItem.RoleAssignments.Add(oSPRoleAssignmentUser);Thanks