简体   繁体   English

drupal 8 中视图节点上基于角色的访问控制

[英]Role based access control on view nodes in drupal 8

Could any one help me on how to filter a view's node list based on the user role?任何人都可以帮助我根据用户角色过滤视图的节点列表吗? For example, consider we have manager and developer roles and there are 3 node items in a view that are node1,node2,node3.Manager has access to node1, node2 & the developer has access to node3.Now,the view should show only node1,node2 when the manager logs in and sees the view.And when the developer logs in,he should be able to see only node3.Thanks in advance例如,假设我们有经理和开发人员角色,并且视图中有 3 个节点项,分别是 node1、node2、node3。Manager 有权访问 node1、node2 并且开发人员有权访问 node3。现在,视图应该只显示 node1 ,node2 当管理员登录并看到视图时。而当开发者登录时,他应该只能看到 node3。提前谢谢

我通过创建一个新的自定义模块使用 node_check_access 钩子实现了 RBAC

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

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