Building a UNIX style permissions system in Django

38 views
Skip to first unread message

Some Developer

unread,
Jul 27, 2015, 12:52:24 PM7/27/15
to Django users
I have a need for a more robust permission system for objects in Django
than the one provided by it in the core distribution.

I want to have users and groups and each to have read, write and edit
permissions but I have no idea how to go about how to implement this.

I was thinking of having a permissions mixin that had three
ManyToManyFields with each of them representing the users that had read,
write and edit permissions but I'm stuck on how to go about implementing
the group permissions.

I basically need to add these fields to the models of objects that I
want permissions for so I was thinking of making them abstract base
models and then having all my other models inherit from them. This
should have the advantage of picking up all the permission based methods
that I can use on objects that make use of the permission system.

Can anyone offer any advice please?

Thanks.

Christian Ledermann

unread,
Jul 28, 2015, 3:59:42 AM7/28/15
to django...@googlegroups.com
https://github.com/diefenbach/django-permissions
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/55B66192.3000707%40googlemail.com.
> For more options, visit https://groups.google.com/d/optout.



--
Best Regards,

Christian Ledermann

Newark-on-Trent - UK
Mobile : +44 7474997517

https://uk.linkedin.com/in/christianledermann
https://github.com/cleder/


<*)))>{

If you save the living environment, the biodiversity that we have left,
you will also automatically save the physical environment, too. But If
you only save the physical environment, you will ultimately lose both.

1) Don’t drive species to extinction

2) Don’t destroy a habitat that species rely on.

3) Don’t change the climate in ways that will result in the above.

}<(((*>
Reply all
Reply to author
Forward
0 new messages