正解如下:
把出错的代码调用放在SPSecurity.RunWithElevatedPrivileges中, 即可.
举例
SPSecurity.RunWithElevatedPrivileges(delegate() { // implementation details omitted });
MSDN解释该方法的功能如下:
Executes the specified method with Full Control rights even if the user does not otherwise have Full Control.
参考资料
==============
SPSecurity.RunWithElevatedPrivileges Method