有没有办法通过 Django 中的模型属性来管理管理面板编辑权限?
因此,我希望能够使用模型属性值控制Django管理面板中模型的写入权限。
这是一个示例:我们有一个名为组织
的模型,属性 is_production 是布尔值。另外,我们有两个角色:开发人员
和客户支持
。我希望来自开发人员
组的用户能够使用is_production = false
和客户支持
的用户能够使用is_production = true
。是否有一种无代码 /低编码的方式来执行此操作,例如扩展 / Django电池?
感谢您的时间!
So, I want to be able to control write permissions for a model in Django admin panel using model property value.
Here's an example: we have a model called Organization
with property is_production
, which is boolean. Also, we have two roles: Developers
and Customer Support
. I want users from Developers
group to be able to edit Organizations with is_production = False
, and users from Customer Support
to be able to edit ones with is_production = True
. Is there a no-code / low-code way to do it, like an extension / Django battery?
Thanks for your time!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论