Django: Adding Permission to an Specific Model Instance

后端 未结 2 1719
感情败类
感情败类 2021-02-19 17:34

I am looking for the best way to implement user permissions to allow users to edit specific model instances.

For instance, I have such two models:

model          


        
相关标签:
2条回答
  • 2021-02-19 17:56

    You are looking for an object permission implementation. A good comparison is here: http://djangopackages.com/grids/g/perms/

    Shameless plug: Heres my fork of a very popular per-object permission app: http://github.com/azizmb/django-authority

    0 讨论(0)
  • 2021-02-19 18:17

    If I am getting you correct, what you need to implement is called row level permissions in Django. Have a look at this if it helps. http://code.djangoproject.com/wiki/RowLevelPermissionsDeveloper

    0 讨论(0)
提交回复
热议问题