Sharepoint Online-为用户禁用齿轮图标,但对于admin&可见完全控制用户 [英] Sharepoint Online - Disable gear icon for users but visible for admin & full control users
问题描述
亲爱的团队,
我正在使用SharePoint Online.我有一个子网站,并且有自定义列表和一个SitePage主页.该自定义列表应该可供用户进行编辑.我想为拥有完全控制权的用户以外的所有用户禁用齿轮图标.欣赏你的 因为我本周必须去参加UAT.
I am using SharePoint Online. I have a sub-site and have custom list and a SitePage Home Page in it. This custom list should be available for users to make edits. I want to disable the gear icon for all users except users with full control. Appreciate your as I have to go for UAT this week.
谢谢
JINCO26
推荐答案
Hi Jinco,
Hi Jinco,
默认情况下,没有开箱即用的选项\功能会隐藏齿轮图标以提供贡献权限.
建议不要采用以下方法,但是,如果登录的用户没有对SharePoint网站的完全控制权限,则可以隐藏齿轮图标.
By default there is no out of the box option\functionality which hides the gear icon for contribute permission.
the below approach is not a recommended on but it serves the purpose to hide gear icon if the logged in user do not have full control permission over the SharePoint site.
<script type="text/javascript" src="/_layouts/15/sp.runtime.js"></script>
<script type="text/javascript" src="/_layouts/15/sp.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script>
var hasPermission = false;
(文档).ready(function(){ getPermissions().then(function(canManage) { 如果(!可以管理) {
(document).ready(function(){ getPermissions().then(function(canManage) { if(!canManage) {
(#O365_MainLink_Settings.o365cs-nav-item.o365cs-nav-button.o365cs-topnavText.ms-bgc-tdr-h.o365button").hide(); } }); }); 函数getPermissions(){ var deferred =
("#O365_MainLink_Settings.o365cs-nav-item.o365cs-nav-button.o365cs-topnavText.ms-bgc-tdr-h.o365button").hide(); } }); }); function getPermissions() { var deferred =
这篇关于Sharepoint Online-为用户禁用齿轮图标,但对于admin&可见完全控制用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!