Posting on behalf of someone - SharePoint 2010

I wanted to know if there is a way for someone to post something on behalf of someone else in SharePoint Server 2010 without too much custom code?

e.g.: Our CEO has a blog but no time to post on it. The goal is to have his assistant post on his blog but it needs to appear as if he is doing the posting. That's just one example but there is many others where one department needs to post as if that department head is actually replying himself (blogs, comments, list, news, etc).

Sharing credentials is not an option.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Its not going to be possible or easily possible.

A couple of thoughts:
   Don't show the "Created By" field.
   Use the Object Model (via Powershell) and attempt to update the created by field - complex and tedious to maintain.
If you use the object model, don;t try to attempt updating the created by field, simply use impersonation.

                using (SPSite site = new SPSite( "url" ))
                    using (SPWeb web = site.OpenWeb())
                        // get the user
                        SPUser user = web.SiteUsers[ "loginnameofsecretary" ];

                        // impersonate the user
                        using (SPSite iSite = new SPSite( "url", user.UserToken))
                            using (SPWeb iWeb = iSite.OpenWeb())

                                // now do whatever you want via the object model

This will mean creating an event handler or custom page.

If you don't want to code then the CEO will need to divulge his/her username and password, not recommended for security reasons
aboredmanAuthor Commented:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It is possible using the solution I described above but it does require writing custom code.

We already do this for task items
I am trying to do exactly what the original asker was trying to do. We have executive blogs on a Sharepoint 2010 installation, and lately our execs have been giving their login credentials to their assistants for posting blogs. Now they have gotten tired of that solution and are pushing hard for a way for their assistants to post in their names without having to have the exec's password.

I have tested out an event receiver using ItemAdding on the Posts List, using the code block posted above to imitate another user. However, I still have not figured out how to make the Author/Created By field update to show the immitated user. It is a Get-only field and will not allow the value to be Set.

Can someone please help me with this?

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SharePoint

From novice to tech pro — start learning today.