diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-04-20 15:04:48 +0200 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-06-12 08:43:31 +0200 | 
| commit | 9777cde256561c13eb3e80dbc07e693f162a7b28 (patch) | |
| tree | 9c5cdc5f59b4b5e0507e76fac02dd1f765cfa0fe /ishtar_common/wizards.py | |
| parent | 2368faf369dfb6c9cf896d54c2540dc933382cb7 (diff) | |
| download | Ishtar-9777cde256561c13eb3e80dbc07e693f162a7b28.tar.bz2 Ishtar-9777cde256561c13eb3e80dbc07e693f162a7b28.zip | |
Manage own permissions with areas for context records (refs #4060)
Diffstat (limited to 'ishtar_common/wizards.py')
| -rw-r--r-- | ishtar_common/wizards.py | 3 | 
1 files changed, 2 insertions, 1 deletions
| diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py index 9e77a0dda..8e7cd0c74 100644 --- a/ishtar_common/wizards.py +++ b/ishtar_common/wizards.py @@ -178,10 +178,10 @@ class Wizard(NamedUrlWizardView):      def dispatch(self, request, *args, **kwargs):          self.current_right = kwargs.get('current_right', None) -          step = kwargs.get('step', None)          # check that the current object is really owned by the current user          if step and self.current_right and '_own_' in self.current_right: +              # reinit default dispatch of a wizard - not clean...              self.request = request              self.session = request.session @@ -194,6 +194,7 @@ class Wizard(NamedUrlWizardView):              current_object = self.get_current_object()              ishtaruser = request.user.ishtaruser \                  if hasattr(request.user, 'ishtaruser') else None +              # not the fisrt step and current object is not owned              if self.steps and self.steps.first != step and\                      current_object and not current_object.is_own(ishtaruser): | 
