From 444a3755aade439ebdab5a053360c50544d41d59 Mon Sep 17 00:00:00 2001 From: zsloan Date: Tue, 14 Jan 2020 16:29:13 -0600 Subject: Temporary fix to ensure no one but Rob or me can edit editable pages --- wqflask/wqflask/docs.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/wqflask/wqflask/docs.py b/wqflask/wqflask/docs.py index f45202af..1dbbabea 100644 --- a/wqflask/wqflask/docs.py +++ b/wqflask/wqflask/docs.py @@ -22,10 +22,13 @@ class Docs(object): self.title = result[0] self.content = result[1] - if 'edit' in start_vars and start_vars['edit'] == "true": - self.editable = "true" - else: - self.editable = "false" + self.editable = "false" + try: + if g.user_session.record['user_email_address'] == "zachary.a.sloan@gmail.com" or g.user_session.record['user_email_address'] == "labwilliams@gmail.com": + self.editable = "true" + except: + pass + def update_text(start_vars): content = start_vars['ckcontent'] -- cgit v1.2.3