Roberto Rosario
f076a49d2d
Deprecate the check_permissions method
...
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com >
2019-01-25 01:17:21 -04:00
Roberto Rosario
097ac7dae6
Move permission purge code
...
Move the code to purge obsolete permissions from the management
command to the StoredPermission default manager.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com >
2019-01-13 23:58:08 -04:00
Roberto Rosario
38d7b7cda3
Add check_permissions replacement
...
Add a new class method named check_user_permission.
This method is smaller as it only accepts a single permission
instead of a single or a list of permission like check_permissions
does. check_user_permission is meant to replace check_permissions.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com >
2019-01-13 22:59:59 -04:00
Roberto Rosario
8c63ef4c69
Styling: PermissionNamespace keyword arguments
...
Add keyword arguments to all called instances of PermissionNamespace.
Sort name and label arguments.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com >
2018-12-14 21:58:38 -04:00
Roberto Rosario
e83f6e55a0
Permission: Permission reference to property
...
Convert the volatile permission reference in the stored permission
model from a method to a property to allow future caching optimization.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com >
2018-12-12 23:12:52 -04:00
Roberto Rosario
b0b6ce7be8
When returning all permissions, return then as proxy (volatile)
...
by default. Same behavior as all() with default arguments.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-08-26 21:59:27 -04:00
Roberto Rosario
f20810b2ae
Add support for getting the list of all permissions as a choice
...
list.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-08-26 02:00:59 -04:00
Roberto Rosario
6c6ca38374
Replace all instances of unicode only handling to use force_text.
...
Replace all __unicode__ methods to __str__ and the
@python_2_unicode_compatible decorator.
Replace all instance of smart_str, smart_unicode, force_uncode
with force_text.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-07-05 15:03:24 -04:00
Roberto Rosario
63682a2945
Merge remote-tracking branch 'origin/master' into feature/master_merge
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-03-14 15:57:38 -04:00
Roger Hunwicks
ed0145cc1c
More detailed logging for permissions checks - see #321
...
Signed-off-by: Roger Hunwicks <roger@tonic-solutions.com >
2017-02-23 16:29:20 +02:00
Roberto Rosario
c81a15f4f0
Add permission list API endpoint.
2017-01-30 00:21:57 -04:00
Roberto Rosario
23ffecdd30
Simplify permission lookup method. Add refresh class method to make sure
...
stored permissions are in sync with proxy permission.
Add __repr__ method.
2017-01-15 23:55:16 -04:00
Roberto Rosario
5893e149e0
Reduce the check_access boilerplate code.
2016-11-02 04:58:05 -04:00
Roberto Rosario
34184e0726
Fix typo in management command name.
2016-03-18 20:58:06 -04:00
Roberto Rosario
27d8644438
Silence 90% of remaining Django 1.8 model warnings.
2016-01-28 05:43:08 -04:00
Roberto Rosario
3b728328ad
PEP8 cleanups, E501.
2015-07-23 04:05:29 -04:00
Roberto Rosario
4527563d89
PEP8 cleanups, specially E501 line too long.
2015-07-22 18:21:37 -04:00
Roberto Rosario
01438f933c
Add tests for the permission app.
2015-07-10 00:38:32 -04:00
Roberto Rosario
0bb8fa2ba9
Add exception, check and message when an invalid permission namespace is requested.
2015-06-30 16:48:27 -04:00
Roberto Rosario
0e24f8d821
Simplify and remove unused code
2015-06-30 02:43:58 -04:00
Roberto Rosario
a68be31e52
Remove unused permissions check code
2015-06-29 16:58:46 -04:00
Roberto Rosario
3d1b030f95
Remove obsolete class Member
2015-06-29 14:30:03 -04:00
Roberto Rosario
88ddb1b1d6
Use repeatable id to cache stored permissions
2015-06-29 14:26:06 -04:00
Roberto Rosario
3754f45001
Reduce checked out document column label string size. Refactor roles: roles can only have groups as members, only roles can hold permissions.
2015-06-29 14:07:02 -04:00
Roberto Rosario
1c084aa07b
Split Permission and StoredPermission class and model into different modules. Simplified the Permission class.
2015-06-28 01:03:29 -04:00
Roberto Rosario
69a7efd6f0
Convert workflows document type selection, smart link document type selection, role members list, user group and group users views to CBV assign remove. Remove now obsolete assign remove function based view
2015-04-07 15:48:27 -04:00