Admin site is a great example of how to do that.  But in general you can
use in the view

if not request.user.has_perm("app name.perm name):
         Raise error like 404 or redirect to login

I think decorator is provide by django.

El jueves, 7 de abril de 2016, Larry Martell <larry.mart...@gmail.com>
escribió:
> On Thu, Apr 7, 2016 at 3:56 AM, Luca Brandi <lucb...@tiscali.it> wrote:
>> Hi
>> is there a possibility to create some group members and let them have
some
>> secific url pages accessible to?
>> I am thinking to a kind of "if staff is member of group"....open link
page..
>
> A quick google for this came up with:
>
>
http://stackoverflow.com/questions/4597401/django-user-permissions-to-certain-views
>
http://stackoverflow.com/questions/14335832/restrict-so-users-only-view-a-certain-part-of-website-django
>
http://stackoverflow.com/questions/12597864/how-to-restrict-access-to-pages-based-on-user-type-in-django
>
> --
> 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+unsubscr...@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/CACwCsY5TeX8Tm-sCFzD89-aaQ6XK18V%2BSwS2W-2HbMCKjNyFLw%40mail.gmail.com
.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
"La utopía sirve para caminar" Fernando Birri

-- 
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+unsubscr...@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/CAG%2B5VyML%3DazeoV-_auqErFUgHFb8yexkD1eNrE0Q6fXZf4a1Gg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to