#18600: group_required decorator
-------------------------------------+-------------------------------------
     Reporter:  daniel.walz@…        |                    Owner:  nobody
         Type:  New feature          |                   Status:  closed
    Component:  contrib.auth         |                  Version:  1.4
     Severity:  Normal               |               Resolution:
     Keywords:  group authorization  |  worksforme
    Has patch:  1                    |             Triage Stage:
  Needs tests:  0                    |  Unreviewed
Easy pickings:  1                    |      Needs documentation:  0
                                     |  Patch needs improvement:  0
                                     |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by daniel.walz@…):

 I just dropped the use of the group_required to follow your suggestion.
 Although I found it very unhandy to create the permissions in the shell.
 Do I understand it right, that the syncdb is creating the standard
 permissions from the model.py, or do I define prototypes for custom
 permissions anywhere in the code, where syncdb reads it and puts it into
 the auth tables?
 If so I would be eger to know that, because that would be the way, I
 define the permission and the use of the permission in the same place i.e.
 the code. That would make sense to me.
 If there is no such place and I have to create the (custom) permissions in
 the shell anyway, I would suggest to meke it possible to create the
 permissions in the admin interface and keep the staff out of that feature
 so that they can't mess with the system (and the administrator can do that
 anyway.

 BTW. If someone wants to use my code, the AnonymousUser needs the method
 "def is_in_group(self, group): return False" to work... sorry for that.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18600#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to