Thursday, August 10, 2017

Re: Row based permissions: In DB or App? ... farewell pain

It's still implemented like that in the background, but I'm not sure why do you call it slow.

Did you run benchmarks? Profiling?

Usually your own business logic will be the bottleneck of your application, not your permission checking.

On Thu, Aug 10, 2017 at 5:15 AM, guettli <guettli.google@thomas-guettler.de> wrote:


Am Mittwoch, 9. August 2017 18:03:44 UTC+2 schrieb Vijay Khemlani:
https://django-guardian.readthedocs.io/en/stable/userguide/check.html#get-objects-for-user

projects = get_objects_for_user(request.user, 'projects.view_project')


Thank you for providing this link. I guess it is new to many developers.

I worked with this method some years ago and it was slow. It was slow since the permission checking
gets done at several ways (via is_superuser, via perms for user, via perms for group, ...) But this is old and outdated
information. I guess this is not true any more.

 

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/afc9ac15-8e61-400a-a36c-c62b5bac22dc%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 users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CALn3ei3u%3Dk4Js%3DknDkWVAwPSfYVbx5fL78BeFabkAkD1mOT%2Biw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment