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 | 3a1fe3e257a5e8053ed961d3b6ba21d956ba842b (patch) | |
tree | 9c5cdc5f59b4b5e0507e76fac02dd1f765cfa0fe /ishtar_common/wizards.py | |
parent | f11450c633fad24307df7924fd4d2e409a603573 (diff) | |
download | Ishtar-3a1fe3e257a5e8053ed961d3b6ba21d956ba842b.tar.bz2 Ishtar-3a1fe3e257a5e8053ed961d3b6ba21d956ba842b.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): |