From 7a14aff983f0aa035d26b9836700d4f1b7141022 Mon Sep 17 00:00:00 2001 From: Marc Sommerhalder Date: Fri, 27 Feb 2015 11:16:39 +0100 Subject: [PATCH] Check permissions in constrain types. Fixes #38. --- docs/HISTORY.rst | 6 ++++++ seantis/people/content/list.py | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/HISTORY.rst b/docs/HISTORY.rst index e4d8115..f62bf59 100644 --- a/docs/HISTORY.rst +++ b/docs/HISTORY.rst @@ -2,6 +2,12 @@ Changelog --------- +0.28 (unreleased) +~~~~~~~~~~~~~~~~~ + +- Check permissions in constrain types. Fixes #38. + [msom] + 0.27 (2015-02-05) ~~~~~~~~~~~~~~~~~ diff --git a/seantis/people/content/list.py b/seantis/people/content/list.py index 873a838..b74cd68 100644 --- a/seantis/people/content/list.py +++ b/seantis/people/content/list.py @@ -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()]