Hi,
The following piece of code is exceuted with elvated priliveliges.
void Test(SPListItem item)
{
SPSecurity.RunWithElevatedPrivileges(delegate()
{
// Perform few operations on the item.
SPFile listfile = item.File;
listfile.Publish("comments");
});
}
The published version has modified by as system account.
Is there any option to publish the file using logon user from within elevated code?
Thanks in advance,
dhijit