隐藏基于用户组的列字段表单 [英] Hide column field form based on User Group

查看:80
本文介绍了隐藏基于用户组的列字段表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我想基于用户组隐藏一些列字段表单(editform.aspx).以前我正在使用以下代码:

解决方案

您好Ameenah,

我们无法通过JavaScript从AD组中吸引用户.

作为一种解决方法,创建自定义WCF服务并使用.net框架从AD组中检索用户.

有关如何在SharePoint 2013中创建自定义WCF服务的演示:

检查用户是否属于广告组:

最好的问候,

张琳达


Hello,

I want to hide some columns field form (editform.aspx) based on  user group. Previously I'm using below code :

Lozzi.Fields.disableWithAllowance(fieldname, groups)
Reference : https://davidlozzi.com/2014/01/14/sharepoint-2013-script-hide-or-disable-your-fields/

Unfortunately, it's working only for user in SharePoint Group. But my case, i have Active Directory (AD) group inside SharePoint Group.

So, any solution?

Thank You.

解决方案

Hi Ameenah,

We cannot get users from the AD group via JavaScript.

As a workaround, create a custom WCF service and retrieve users form AD groups using .net framework.

A demo about how to create a custom WCF service in SharePoint 2013:

https://social.technet.microsoft.com/wiki/contents/articles/24194.sharepoint-2013-create-a-custom-wcf-rest-service-hosted-in-sharepoint-and-deployed-in-a-wsp.aspx

Check if the user belongs to the AD group:

https://stackoverflow.com/questions/12029378/how-to-check-if-a-user-belongs-to-an-ad-group

Best Regards,

Linda Zhang


这篇关于隐藏基于用户组的列字段表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆