简体   繁体   English

Dynamics CRM + 隐藏基于安全角色的按钮

[英]Dynamics CRM + Hide a button based on security role

I want to hide a button on the ribbon for all users except System Admin and I do not want to write javascript to check the security role of the logged in users.我想为除系统管理员之外的所有用户隐藏功能区上的按钮,并且我不想编写 javascript 来检查登录用户的安全角色。 Is there any out-of-box way I can achieve this?有什么开箱即用的方法可以实现这一目标吗?

Also is there any entity that only admin has access to which I can use to hide show the button?还有只有管理员可以访问的任何实体,我可以用来隐藏显示按钮吗?

Yes, you can achieve this without code.是的,您无需代码即可实现此目的。

One option is using MiscellaneousPrivilgeRule under display rules and making sure to pick some privilege like Publish Duplicate Detection Rules which may not be given to non-Admin roles.一种选择是在显示规则下使用MiscellaneousPrivilgeRule并确保选择一些权限,例如Publish Duplicate Detection Rules ,这些权限可能不会授予非管理员角色。

在此处输入图像描述

在此处输入图像描述

Read more 阅读更多

There's no OOB entity for that purpose, you can identify one in your system or create a dummy entity for that purpose.没有用于此目的的 OOB 实体,您可以在系统中识别一个或为此目的创建一个虚拟实体。

Yes you can try this option.是的,您可以尝试此选项。

  1. Create a Custom Entity (Custom Button Privelege)创建自定义实体(自定义按钮权限)
  2. By default only Sys Admin/Cust role will have Privelege to do CRUD operation.默认情况下,只有 Sys Admin/Cust 角色将拥有执行 CRUD 操作的权限。
  3. In the custom button -> Display Rule.在自定义按钮 -> 显示规则中。 Set a Entity Privelege Rule based on the custom entity.根据自定义实体设置实体特权规则。
  4. Now the button will be visible only for the Admin users & will be hidden for other users.现在该按钮将仅对管理员用户可见,而对其他用户隐藏。

Similarly we can modify the security role for others as well.同样,我们也可以为其他人修改安全角色。

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

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