【问题标题】:How to find if current sharepoint web is inheriting the permission from the parent web using Jquery如何使用 Jquery 查找当前的 sharepoint web 是否从父 web 继承权限
【发布时间】:2019-04-03 15:16:03
【问题描述】:

有没有一种方法可以测试当前网站是否继承了父网站的权限。 列表项具有 HasUniqueRoleAssignments 属性,该属性告诉列表是继承还是具有唯一权限。但是网络没有看起来像的东西。

SharePoint 网站有类似的东西吗?

【问题讨论】:

    标签: sharepoint sharepoint-2013 sharepoint-online office365api sharepoint-rest-api


    【解决方案1】:

    Web 对象确实具有 HasUniqueRoleAssignments。它没有在文档中列出,但它就在那里。在 JS 中:

    var context = SP.ClientContext.get_current();
    var web = context.get_web();
    context.load(web, 'HasUniqueRoleAssignments');
    context.executeQueryAsync(function(){
        if (web.get_hasUniqueRoleAssignments())
            console.log("It's unique!");
        else
            console.log("It inherits!");
    }, function(){alert('Oopsie!')});
    

    【讨论】:

      猜你喜欢
      • 2023-03-24
      • 1970-01-01
      • 2017-09-22
      • 2011-10-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-26
      • 1970-01-01
      相关资源
      最近更新 更多