Skip to content

Commit

Permalink
Check permissions in constrain types. Fixes #38.
Browse files Browse the repository at this point in the history
  • Loading branch information
msom committed Feb 27, 2015
1 parent 13d4ad1 commit 7a14aff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions docs/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Changelog
---------

0.28 (unreleased)
~~~~~~~~~~~~~~~~~

- Check permissions in constrain types. Fixes #38.
[msom]

0.27 (2015-02-05)
~~~~~~~~~~~~~~~~~

Expand Down
5 changes: 4 additions & 1 deletion seantis/people/content/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ def getConstrainTypesMode(self):
return ENABLED

def allowedContentTypes(self):
return self.context.available_types()
return [
t for t in self.context.available_types()
if t.isConstructionAllowed(self.context)
]

def getLocallyAllowedTypes(self):
return [t.id for t in self.allowedContentTypes()]
Expand Down

0 comments on commit 7a14aff

Please sign in to comment.