James Bennett
66ada24678
Move the per-object-permissions branch into the attic.
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/attic/per-object-permissions@11516 bcc190cf-cafb-0310-a4f2-bffc1f526a37
archive/attic/per-object-permissions
2009-09-11 21:25:01 +00:00
Christopher Long
ae22b6d403
per-object-permissions: Merged to trunk [5486] NOTE: Not fully tested, will be working on this over the next few weeks.
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@5488 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-17 22:18:54 +00:00
Adrian Holovaty
0cf7bc4391
per-object-permissions: Merged to trunk [4241]
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@4242 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-27 02:49:28 +00:00
Adrian Holovaty
c4673e4fb6
per-object-permissions: Merged to trunk [4101]
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@4102 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-25 05:22:22 +00:00
Adrian Holovaty
6fab0ffcad
per-object-permissions: Made some code-formatting changes
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@4100 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-25 05:18:33 +00:00
Adrian Holovaty
1b54fc3aba
per-object-permissions: Merged to trunk [4095]
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@4096 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-24 04:17:58 +00:00
Adrian Holovaty
47fca880e3
per-object-permissions: Small change to django.db.models.base check to make it more explicit
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@4095 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-24 04:13:11 +00:00
Christopher Long
f6fa103296
[per-object-permissions] Merged to trunk [3938]
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3940 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-10-27 02:11:46 +00:00
Christopher Long
3f60a8e98d
[per-object-permissions] Fixed a bug where the RLP for an inline object would only be set when changing an object not adding
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3896 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-10-04 01:57:00 +00:00
Christopher Long
46f6dc7e4e
[per-object-permissions] Sets the row level permisisons on objects created inline if the inline objects have row level permissions enabled. This has not been tested indepth, and might not work 100%
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3895 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-10-03 18:11:02 +00:00
Christopher Long
655bee8b28
[per-object-permissions] First version where inline objects are checked for row level permissions
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3891 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-10-03 13:19:19 +00:00
Christopher Long
ea249260dc
[per-object-permissions] Latest revision showed "Edit Row Level Permissions" for all objects in admin interface (not just those for which it is enabled), this revision fixes this bug
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3843 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-25 21:06:35 +00:00
Christopher Long
5ea24f0c14
[per-object-permissions] Merged to trunk [3809]
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3810 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-23 18:18:58 +00:00
Christopher Long
13d039ddab
[per-object-permissions] Fixes the bug described by schotm where group permissions were causing a db error when show_all_rows was set to false
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3809 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-23 17:35:37 +00:00
Christopher Long
aa6725cb07
[per-object-permissions] Fixes another problem when using one-to-one relations and POPs
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3769 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-18 14:21:47 +00:00
Christopher Long
20ca1751dc
[per-object-permissions] Fixes bug described in ticket #2749
...
[per-object-permissions] Fixes the add manipulator so it does not assume the pk attribute is "id"
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3767 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-17 18:32:27 +00:00
Christopher Long
a2fbd5f14c
[per-object-permissions] Fixes the delete permission which assumed the object had an id attribute
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3764 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-15 19:01:37 +00:00
Christopher Long
43260cfbf2
[per-object-permissions] Fixes MySQL error caused by when a user is not a member of a group
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3753 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-12 15:55:49 +00:00
Christopher Long
00972e69b6
[per-object-permissions] Fixes problem with one-to-one relationships as the original code assumed every model had an id attribute, now uses "_get_pk_val()" to determine the model id.
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3752 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-12 15:04:29 +00:00
Christopher Long
e12c2f83e0
[per-object-permissions] Merged to trunk [3731]
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3732 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-07 01:36:27 +00:00
Christopher Long
5c13ad5ea2
[per-object-permissions] Fixes #2664 and #2663
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3731 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-07 01:28:37 +00:00
Christopher Long
aef05822d0
[per-object-permissions] Fixes #2652 , modified the form field to include the app label in the select field (the elements of which are now separated by a /)
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3716 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-04 16:59:09 +00:00
Christopher Long
ea2a514f5c
[per-object-permissions] Fixed #2622 and added in contains_permission method to the anonymous user model
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3682 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-30 19:14:09 +00:00
Christopher Long
325762a1e9
[per-object-permissions] Fixed missing parenthesis
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3677 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-29 13:49:45 +00:00
Christopher Long
64be2e2881
[per-object-permissions] New method: get_model_list in the RowLevelPermission manager. This returns a list of ids for the given model that the user has the given permission on. It should work better then doing something like has_perm or {% if_has_perm %}
...
[per-object-permissions] Modified the change_list to use get_model_list instead of the current checking each perm. Note: this method has not been tested extensively, and might cause some problems
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3674 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-28 19:53:26 +00:00
Christopher Long
61d6f592c9
[per-object-permissions] Merged to trunk 3666
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3669 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-28 13:06:03 +00:00
Christopher Long
bd64483da6
[per-object-permissions] Removed a debug print statement and changed an incorrect order of a format string
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3657 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-25 10:50:46 +00:00
Christopher Long
5d37e5cd4c
[per-object-permissions] Fixed a bug where delete row level permission was giving a PermissionDenied error falsely. (Missed adding the file to the commit)
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3656 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-24 16:08:13 +00:00
Christopher Long
7b2e3798f4
[per-object-permissions] Fixed two bugs (noticed by Robert). 1) has_add_permission was not part of the new add user context and was causing an error when rendering the submit_row, changed view to have the has_add_permission 2) Custom SQL for checking if permissions exist was causing an error due to an incorrect False statment, corrected now.
...
[per-object-permissions] Fixed a bug where delete row level permission was giving a PermissionDenied error falsely
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3655 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-24 16:07:30 +00:00
Christopher Long
84771a606a
[per-object-permissions] Fixed up some comments
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3631 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-21 01:16:26 +00:00
Christopher Long
49c1c2fdd3
[per-object-permissions] Update to trunk
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3630 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-20 22:49:48 +00:00
Christopher Long
455842e07e
[per-object-permissions] Fixed bug in contains_permission where it was just checking against any permission instead of the given permission
...
[per-object-permissions] Made changes so delete and "Save and add another" only shows up if the user has permissions
[per-object-permissions] Rewrote the has permission variables in the context for change form to use has_perms and check for model
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3629 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-20 22:46:38 +00:00
Christopher Long
98fc1a220f
[per-object-permissions] Added comments to change_list and admin_list.py
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3628 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-20 22:23:42 +00:00
Christopher Long
736febadc5
[per-object-permissions] Removed debug print statement in auth/models.py
...
[per-object-permissions] Added admin option: show_all_rows which by default is set to True. If False, it will only show the rows the user has permission for. Implemented the changes into change_list to allow this
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3627 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-20 22:17:01 +00:00
Christopher Long
8a38dfaa83
[per-object-permissions] Updated admin pages to use contains_permission, this means the admin interface will now show the change list link to a user even if they only have change row level permissions on one of the objects. Right now, it does list all the objects and does not filter out those that the user does not have permissions on.
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3625 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-20 20:54:37 +00:00
Christopher Long
e1caee2b28
[per-object-permissions] Expanded on has_module_perm to check for row level permissions contained within the module
...
[per-object-permissions] Created method contains_permission to check if a user has a permission on a model (not hte instance). The difference between this and has_perm is that contains_permission does not require an instance of a model, it only checks that there exists a row level permission for an instance of this object.
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3624 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-20 20:52:58 +00:00
Christopher Long
19ece7470d
[per-object-permissions] Removed commented (unused) code
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3623 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-20 18:02:58 +00:00
Christopher Long
722d0dbf42
[per-object-permissions] Added some more comments
...
[per-object-permissions] Added "hidden" option to admin options, this is to allow an object to have admin options but not be shown on the admin interface. Might not be wanted, and can be removed if that is the case.
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3622 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-20 18:00:07 +00:00
Christopher Long
6bed9e0b2c
[per-object-permissions] Minor fixes to admin RLP views
...
[per-object-permissions] Removed test failing due to cache problems
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3619 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-20 00:13:46 +00:00
Christopher Long
23cb1f0eb6
[per-object-permissions] Minor fixes to admin RLP interface
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3618 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-19 19:45:41 +00:00
Christopher Long
741df7b44c
[per-object-permissions] Changed pagination to use the paginator tag described on http://code.djangoproject.com/wiki/PaginatorTag
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3617 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-19 18:21:01 +00:00
Christopher Long
b5cbbf58c0
[per-object-permissions] Added "Edit Row Level Permissions" link on change_form if object has row level permissions enabled
...
[per-object-permissions] Modified the row level permissions edit page so the URL is based off of the object instead of being part of the auth
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3616 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-19 17:53:48 +00:00
Christopher Long
9f115aa7ea
[per-object-permissions] Updating admin interface of RLP to be on a separate page, not entirely working at this point
...
[per-object-permissions] Changed global.css to apply styles to reset button
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3615 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-19 16:27:56 +00:00
Christopher Long
da50848a71
[per-object-permissions] Fixed bug in if_has_perm tag that would cause it to not work if an object paramter was not passed to it
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3614 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-19 16:26:11 +00:00
Christopher Long
f180bb6ab3
[per-object-permissions] Renders multiple object select field using optgroup to separate the types of objects
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3610 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-18 14:23:57 +00:00
Christopher Long
7c986521cf
[per-object-permissions] Added grant_change_row_level_perm and grant_delete_row_level_perm for admin class in models, assigns the given permissions automatically after creation of an object
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3609 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-18 14:06:02 +00:00
Christopher Long
8250114990
[per-object-permissions] Created template tag if_has_perm to check for a users permission
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3589 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-15 00:13:16 +00:00
Christopher Long
8cd0dbdfce
[per-object-permissions] Corrected bug in creating of default row level perms that would cause no permission to be found due to capitalization
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3587 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-14 23:21:10 +00:00
Christopher Long
77eda0234e
[per-object-permissions] Corrected incorrect import in row_level_perm_manipulator and made some format changes to the row level perm template
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3586 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-14 23:19:52 +00:00
Christopher Long
dc3c4db114
[per-object-permissions] Merged to revision 3582 (resolved conflict)
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3584 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-14 18:52:53 +00:00