diff options
Diffstat (limited to 'sugar_network/model/implementation.py')
-rw-r--r-- | sugar_network/model/implementation.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sugar_network/model/implementation.py b/sugar_network/model/implementation.py index 55636e3..f1c1c23 100644 --- a/sugar_network/model/implementation.py +++ b/sugar_network/model/implementation.py @@ -31,8 +31,9 @@ class Implementation(db.Resource): @context.setter def context(self, value): - context = self.volume['context'].get(value) - enforce(self.request.principal in context['author'], http.Forbidden, + authors = self.volume['context'].get(value)['author'] + enforce(not self.request.principal and not authors or + self.request.principal in authors, http.Forbidden, 'Only Context authors can submit new Implementations') return value |