如何防止 mysite 所有者删除 MySite 根网站
我正在寻找一种方法来防止 SharePoint 中的用户删除其 MySite,或者更准确地说,防止删除 MySite 的根网站。 如果我可以存档它,我可以放置一些用户也不允许删除的列表。
我首先考虑赋予用户删除网站的权利,但我认为这将阻止他删除他创建的子网站。 所以这不是一个选项,因为我不想限制 MySite 的使用。
那么我能做些什么来解决这个问题呢?
I'm looking for a way to prevent a user in SharePoint from deleting his MySite or be more precise from deleting the MySite's root web site. If I could archive this, I could place some lists the user will also not be allowed to delete.
I first thought about taking the user the right to delete sites but I think this will prevent him also from deleting sub sites he created. So this is not an option as I don't want to limit the use of the MySite.
So what can I do to solve this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您开发一个功能,为 WebDeleting 事件安装代码,并根据您的需要将 SPWebEventProperties.Cancel 设置为 true。
您可以检查 RootWeb.Id 是否与 SPWebEventProperties.WebId 相同,并以此为基础触发 SPWebEventProperties.Cancel = true 。
You develop a feature that installs code for the WebDeleting event and sets the SPWebEventProperties.Cancel to true depending on your needs.
You can probably check if the RootWeb.Id is the same as the SPWebEventProperties.WebId, and base your triggering of the SPWebEventProperties.Cancel = true on that.