Permission classes for Class Based Views

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Permission classes for Class Based Views

piotr.szpetkowski
Hello, my first post here!

This post is about a new feature request I'd like to propose and it's about permission classes (just like I've stated in topic) for CBVs. I've provided most of the technical information at [0], because I think that such information is more ticket-specific, however I'm not sure if what I did is a correct way, because docs say that feature requests should begin their lifespan at the mailing list. Well, anyway basically saying the reason to have it in core Django is to make managing "who can do what" in a simpler, faster and more expendable manner.

I believe that everything that we need to discuss the matter is already at [0] so I'd be extremely happy if somebody would reply with some thoughts about it.

[0] https://code.djangoproject.com/ticket/27950

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/605eddf3-147a-4e39-a9fb-4e40f055c4d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Permission classes for Class Based Views

Marc Tamlyn
I don't feel there is any need for this feature in Django. As you mention in the ticket, there are ways of approaching it used in DRF, there are other ways in django-braces[0], I personally have my own taste in how to handle it. The details will depend on the logic necessary - sometimes you need to load objects to check permission, sometimes you don't. There is no one size fits all approach.


On 16 March 2017 at 20:10, <[hidden email]> wrote:
Hello, my first post here!

This post is about a new feature request I'd like to propose and it's about permission classes (just like I've stated in topic) for CBVs. I've provided most of the technical information at [0], because I think that such information is more ticket-specific, however I'm not sure if what I did is a correct way, because docs say that feature requests should begin their lifespan at the mailing list. Well, anyway basically saying the reason to have it in core Django is to make managing "who can do what" in a simpler, faster and more expendable manner.

I believe that everything that we need to discuss the matter is already at [0] so I'd be extremely happy if somebody would reply with some thoughts about it.

[0] https://code.djangoproject.com/ticket/27950

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/605eddf3-147a-4e39-a9fb-4e40f055c4d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAMwjO1ECf3cgaZxxN6D530v-cig2m%3D3KdVfDuow1rZZrTQQirQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Permission classes for Class Based Views

Paweł Święcki
In reply to this post by piotr.szpetkowski
Good idea. I use permission classes in DRF and I would use them in Django. Using `|` for "or" is something to be discussed, though.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/718cf38f-0106-4c1e-8909-fab3f18eeb06%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...