SharePoint 2013 启用 以其他用户身份登陆(Sign in as different user)

时间:2023-03-09 01:39:07
SharePoint 2013 启用 以其他用户身份登陆(Sign in as different user)

习惯于SharePoint 2010的用户会发现,SharePoint 2013默认把  以其他用户身份登陆(Sign in as different user)的选项去掉了,这对于开发人员来说很麻烦,尤其是需要平凡切换用户来进行测试。幸运的是,修改相关的文件,就可把 以其他用户身份登陆(Sign in as different user)这个选项开启。

解决步骤

  • 进入(C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\CONTROLTEMPLATES)目录,定位到Welcome.ascx

SharePoint 2013 启用 以其他用户身份登陆(Sign in as different user)

  • 打开Welcome.ascx,将以下代码复制进去
  <SharePoint:MenuItemTemplate runat="server" ID="ID_LoginAsDifferentUser"
Text="<%$Resources:wss,personalactions_loginasdifferentuser%>"
Description="<%$Resources:wss,personalactions_loginasdifferentuserdescription%>"
MenuGroupId=""
Sequence=""
UseShortId="true"
/>
  • 注意将代码负责到ID_PersonalInfomation和ID_RequestAccess之间

SharePoint 2013 启用 以其他用户身份登陆(Sign in as different user)

  • 登陆之后,查看即可使用 以其他用户身份登陆

SharePoint 2013 启用 以其他用户身份登陆(Sign in as different user)

小结

可能最新的SharePoint 2013 Updates会修改这个设置,但我没有验证过。我的版本为:SharePoint 2013 Foundation原始版本。