简体   繁体   中英

SharePoint WebPart Impersonation problem

I want to render all WebParts on the Page in context of some other user which password is unknown. I'm SiteCollection Administrator. Solution like this

does not do the trick because there are some webparts like ListViewWebPart i can't modify and I can't inherit.

Best solution would be to write webPart which will modify context of all others, however I'm not sure how to ensure that webPart is rendered as first and how to modify the context.

Do you think that global.asax might be useful in this situation?

Regards

Adam

If you don't have the user context available, and you don't know their password, how could you impersonate them? Being an administrator doesn't give you the power to trump the underlying security model or audit trail.

Hmm, the only way I could think of is modifying the compat.browser file so any call to the OOTB ListViewWebPart would be redirected to your own, derived CustomListViewWebPart. Still not sure if tyhat will do the trick though.

问题是ListViewWebPart是密封的(作为sharePoint类的一半:/)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM