Put case study editing behind a feature flag

This commit is contained in:
2019-03-07 09:15:18 +00:00
parent f346356239
commit 0656eee87a
4 changed files with 13 additions and 1 deletions

View File

@ -166,6 +166,9 @@ class EditCaseStudy(UserPassesTestMixin, BaseEditForm):
form_class = ShortCaseStudyForm
def test_func(self):
if settings.FFCAN_EDIT is False:
return False
object = self.get_object()
if object.author:
author = object.author.id