如何以编程方式检查 SharePoint 中 URL 的查看权限?

发布于 2024-09-18 03:39:57 字数 241 浏览 3 评论 0原文

我正在向登录用户显示热门公共书签的列表。有些用户无权访问这些书签网址,我想抑制结果,以便仅向用户显示可访问的网址。

我尝试使用 DoesUserHavePermissions 方法,但问题是我我不确定 url 指向哪个对象(item/list/web/site)。

I am displaying a list of popular public bookmarks to the logged-in user. Some users dont have access to these bookmark-urls and I want to suppress the results so that only accessible urls are shown to the user.

I tried to use the DoesUserHavePermissions method, but the problem is that I am not sure what object does the url points to (item/list/web/site).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

坏尐絯℡ 2024-09-25 03:39:57

我想通了:|
当从 SocialTagManager 获取流行书签时,我需要传递登录用户上下文,即 SPServiceContext.Current,SharePoint 将处理其余的事情。

I figured it out :|
when getting popular bookmarks from SocialTagManager i need to pass the logged-in users context i.e. SPServiceContext.Current and SharePoint will take care of the rest.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文