Skip to content

Commit

Permalink
Added assertion in permission editor code.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemintz committed Apr 24, 2013
1 parent b8ab359 commit c98f156
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions deme_django/cms/templatetags/item_tags.py
Expand Up @@ -1401,6 +1401,7 @@ def render(self, context):
assert False
if self.is_new_item:
# Creator has do_anything ability when creating a new item
assert target is None
creator = Agent.objects.get(pk=context['cur_agent'].pk)
creator_permission = OneToOnePermission(source=creator, ability='do_anything', is_allowed=True)
agent_permissions = [x for x in agent_permissions if not (x.source == creator and x.ability == 'do_anything')]
Expand Down

0 comments on commit c98f156

Please sign in to comment.