简体   繁体   English

基于权限在 SharePoint 快速启动中隐藏链接

[英]Hiding Link In SharePoint Quicklaunch Based On Permissions

I am trying to figure out a way to hide a specific link from the Quicklaunch navigation bar on one of my sites in SharePoint 2013 and am having some trouble.我试图找出一种方法来隐藏我在 SharePoint 2013 中的一个网站上的 Quicklaunch 导航栏中的特定链接,但遇到了一些问题。 Basically I am trying to make it so that a link is only visible to users within a specific group and any other users that are not part of this group will not see the Quicklaunch link.基本上,我试图使链接仅对特定组中的用户可见,并且不属于该组的任何其他用户将看不到 Quicklaunch 链接。 I have been reading up on how to implement this via css and javascript within the default master page but do not seem to be having any luck.我一直在阅读如何在默认母版页中通过 css 和 javascript 实现这一点,但似乎没有任何运气。 I was using SPServices to get the group membership for the currently logged in user and based on there membership either hiding or showing the specific Quicklaunch item.我使用 SPServices 来获取当前登录用户的组成员身份,并根据成员身份隐藏或显示特定的 Quicklaunch 项目。 I implemented this code into the master page and I though I had it working, however upon navigating to a different page, list, or library within the site the given link reappears.我将此代码实施到母版页中,虽然我已经让它工作了,但是在导航到站点内的不同页面、列表或库时,给定的链接重新出现。 I do not know if I am doing something wrong but as a last resort I have come here for answers.我不知道我是否做错了什么,但作为最后的手段,我来到这里寻求答案。 If anyone could point me in the right direction I would greatly appreciate it.如果有人能指出我正确的方向,我将不胜感激。

Bellow is a screenshot to get a better understanding of what it is I am trying to do...波纹管是一个屏幕截图,可以更好地了解我正在尝试做什么......

我正在努力完成的事情

Security trimming should be automatic for the quick launch.为了快速启动,安全调整应该是自动的。 Users not being able to see the list, should not see the quicklaunch entry.无法看到列表的用户不应看到快速启动条目。 One thing i experienced in the past is that the security trimming does not work if your quick launch URL looks like this我过去经历的一件事是,如果您的快速启动 URL 看起来像这样,则安全修整不起作用

https://url/sites/sc/Lists/internallistname

but will work if you include the aspx-page但如果你包含 aspx-page 会起作用

https://url/sites/sc/Lists/internallistname/AllItems.aspx

Don't know about foundation but it's worth a try...不知道基础,但值得一试......

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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