阿兹曼在资源层面
我在之前的项目中使用过 Azman ,它在授权操作时效果很好在系统级
- 授权角色X执行操作Y。
- 允许经理update_sales_orders
在新项目中,我需要在记录级别管理授权。
- 授权角色X对记录#Z执行操作Y,
- 允许经理update_sales_order # 23
实现这一目标的最佳方法是什么?如果有支持此功能的授权 API,我将很高兴听到它。否则,欢迎任何建议。
I have used Azman in a previous project and it works well when authorizing operations on a system-level
- authorize role X to perform operation Y.
- allow Managers to update_sales_orders
In a new project, I need to manage authorizations on a record level.
- authorize role X to perform operation Y on record #Z
- allow Managers to update_sales_order # 23
What is the best way of achieving this? If there is an authorization API that supports this I would be glad to hear about it. Otherwise, any suggestion is welcomed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
AzMan 有一个名为范围
这可以完成你所要求的。范围可以是任何数据。例如,在工作中,我们有一个分支范围。因此,对于分配给范围 1234 的人员,该人员只能对属于分支 1234 的数据执行分配给他们的操作。
AzMan has a feature called scopes
that can accomplish what you are asking. A scope can be any piece of data. Here at work, for example, we have a branch scope. So, for a person assigned to a scope of 1234, that person can only perform the operations assigned to them on data belonging to branch 1234.