Commit graph

24 commits

Author SHA1 Message Date
Jannis Leidel
8f85db2438 Remove erroneous check for an existing obj in generic permission check. 2009-07-06 13:57:45 +02:00
Jannis Leidel
15f1af8295 Undid last commit partially. 2009-07-06 11:26:53 +02:00
Jannis Leidel
37a4ae24fb Cache permission choices for each model class. 2009-07-06 11:10:08 +02:00
Jannis Leidel
aad51ef877 Removed dependency on external decorator package, using functools.wraps instead. 2009-07-06 11:08:36 +02:00
Jannis Leidel
3fe2ba2991 The decorator falls back nicely if a query parameter isn't given and therefore None by ignoring it. 2009-07-05 23:42:30 +02:00
Jannis Leidel
0b369d9310 Renamed verbose_name attribute of permission checks to short_description for consistency 2009-07-04 11:06:01 +02:00
Jannis Leidel
9dd3affcc1 Made PermissionInline a bit more pleasant with ForeignKeyRawIdWidget and automatic choices for permission field 2009-07-03 18:04:22 +02:00
Jannis Leidel
77313a9a97 Added default template of permission denied view (403.html) 2009-07-03 15:47:46 +02:00
Jannis Leidel
f8cb902476 Take Django's default permissions into account again 2009-07-03 15:45:34 +02:00
Jannis Leidel
287d2eccd5 Fixed decorator to only check for permissions if user is logged in. Added permission_denied view to be used when permission check unsuccessful, e.g. with the new permission_required_or_403 decorator. The permission_required decorator will redirect to the login form by default. 2009-07-03 15:41:21 +02:00
Jannis Leidel
0f14d735a3 Fixed permission check handling, abstracted some bits and removed special "admin" permission check. 2009-07-03 15:38:45 +02:00
Jannis Leidel
8a38d574d5 Added decorator to be used with views, yay 2009-06-22 01:06:21 +02:00
Jannis Leidel
8e285686a5 Refined permission system to have three types of permission checks: default (add, browse, change and delete), custom (like defaul checks) and complex (method based). 2009-06-22 01:05:31 +02:00
Jannis Leidel
5ba65d928d Fixed permission manager for user 2009-06-22 01:00:25 +02:00
Jannis Leidel
e44842df3c Removed model attribute from permission admin 2009-06-12 11:48:20 +02:00
Jannis Leidel
539a8bf637 Removed some debug print statements and got rid of the importlib in authority.autodiscover() 2009-06-12 01:57:08 +02:00
Jannis Leidel
6caa002694 Removed old exceptions and the autodiscover call which should be made in urls.py like admin 2009-06-12 01:48:50 +02:00
Jannis Leidel
0ffda098d5 Got rid of unneeded importlib.import_module import, err. 2009-06-12 01:25:39 +02:00
Jannis Leidel
dfa487e44d Moved a bunch of methods to the model manager, which now resides in its own file. Promoted permission registry to a class to put some utility functions to it, including a function to compile a choice list for a given permission label. Updated __unicode__ of Permission model. Added new default permission check 'can_browse'. Added support for verbose names of permission checks. Updated forms to work with all changes. Moved codename field to base form class. 2009-06-12 01:11:06 +02:00
Jannis Leidel
9e666d9099 Renamed permissions template tags 2009-06-12 00:54:48 +02:00
Jannis Leidel
5c6fcfe884 Renamed permissions template tags
--HG--
rename : src/authority/templatetags/permissions_tags.py => src/authority/templatetags/permissions.py
2009-06-12 00:54:34 +02:00
Jannis Leidel
4e91ac30e7 Fixed fallback to Django's permission system 2009-06-08 13:18:54 +02:00
Jannis Leidel
5d76231cbe Hm, silly 2009-06-08 12:25:10 +02:00
Jannis Leidel
d0ebca03a2 added authority app 2009-06-08 12:00:44 +02:00