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
Christopher Long
4cfd3203a6
[per-object-permissions] Merged to revision 3582
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3583 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-14 18:52:03 +00:00
Christopher Long
4f0118995c
[per-object-permissions] Added "Apply Selected" button to RLP table that submits the selected row levle permissions to be changed.
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3578 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-13 21:36:38 +00:00
Christopher Long
03e1b7f821
[per-object-permissions] Removing YUI toolkit code.
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3557 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-11 14:07:47 +00:00
Christopher Long
e46e6f6a3f
[per-object-permissions] Removed AJAX code from branch. Will possibly be integrated in at another point.
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3556 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-11 14:05:39 +00:00
Christopher Long
98bb076a49
[per-object-permissions] Separated the AJAX javascript from the non-AJAX JS
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3555 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-11 13:57:28 +00:00
Christopher Long
ea345fa7f4
[per-object-permissions] Forgot to add toolkit files in last commit
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3541 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-09 01:26:53 +00:00
Christopher Long
2176184dc3
[per-object-permissions] AJAX interface is now working most of the time. A fair amount of work has to be done still and some tidying up of the interface. Uses YUI toolkit. Currently comes w/ the full toolkit, once debugged and working will keep only the needed js files.
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3540 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-09 01:22:35 +00:00
Christopher Long
759f426f24
[per-object-permissions] Rewrote urls for row level permission views to take the ajax parameter as a GET instead of a addition to the URL
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3534 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-07 17:30:27 +00:00
Christopher Long
b68a6ae701
[per-object-permissions] model test for row level permissions (w/ files)
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3533 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-07 17:29:32 +00:00
Christopher Long
1eb8c61711
[per-object-permissions] model test for row level permissions
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3532 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-07 17:29:13 +00:00
Christopher Long
e8ea76b4c7
[per-object-permissions] Fixed RLP perm checking so it now accepts the string app_label.perm_codename format correctly.
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3531 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-07 17:28:16 +00:00
Christopher Long
18c889d8fb
[per-object-permissions] First version of checking for row level permissions. No cache implemented at this point. See wiki page for more details.
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3529 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-06 19:44:58 +00:00
Christopher Long
aba82ef36b
[per-object-permissions] Renamed the attribute in RLPs to be model instead of type
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3518 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-02 15:47:11 +00:00
Christopher Long
68072fa75c
[per-object-permissions] Fixed some problems with checking of permissions
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3487 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-29 18:27:50 +00:00
Christopher Long
340718bd3a
[per-object-permissions] Very basic integration of RLPs into admin interface.
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3486 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-29 16:00:23 +00:00
Christopher Long
75c6dc967d
[per-object-permissions] Update to trunk
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3464 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-27 22:38:02 +00:00
Christopher Long
8e48efbbd0
[per-object-permissions] django.db.models.base now adds the row level permission relation when enabled using the meta class
...
[per-object-permissions] django.db.models.options contains the row level permission option for the meta class, by default the option is false (not enabled)
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3441 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-24 23:29:35 +00:00