author | jlgijsbers <jlgijsbers@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Sat, 14 Feb 2004 19:58:20 +0000 (19:58 +0000) | ||
committer | jlgijsbers <jlgijsbers@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Sat, 14 Feb 2004 19:58:20 +0000 (19:58 +0000) | ||
commit | 3d14fb0d1ccc7fb99968e5f94bf48c5719eca310 | |
tree | 60b5146b530d0b8591deb49f6109bddf13600757 | tree | snapshot |
parent | 68033ab2df9d6db8e7400db70e701503771e36ee | commit | diff |
Remove duplication in permission handling:
* Use execute() as a Template Method, with permission() and handle() as the hook methods.
* Provide a default implementation for the permission() method, which checks for self.permissionType, if the attribute is defined.
* New hasPermission() method which checks whether the current user has a permission on the current class
editItemPermission method:
* Better error message when user is editing roles when they shouldn't be.
* Extracted isEditingSelf(), which checks whether a user is editing his/her own details.
* Use hasPermission method.
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@2086 57a73879-2fb5-44c3-a270-3262357dd7e2
* Use execute() as a Template Method, with permission() and handle() as the hook methods.
* Provide a default implementation for the permission() method, which checks for self.permissionType, if the attribute is defined.
* New hasPermission() method which checks whether the current user has a permission on the current class
editItemPermission method:
* Better error message when user is editing roles when they shouldn't be.
* Extracted isEditingSelf(), which checks whether a user is editing his/her own details.
* Use hasPermission method.
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@2086 57a73879-2fb5-44c3-a270-3262357dd7e2
roundup/cgi/actions.py | diff | blob | history | |
roundup/cgi/client.py | diff | blob | history |