From 8c2bed283fa6c56ea6c0b8c3993aea453d5056f6 Mon Sep 17 00:00:00 2001 From: McMatts Date: Mon, 21 Oct 2019 10:34:10 +0100 Subject: [PATCH] Sync edit checks across editions --- gui/app/components/document/page-heading.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gui/app/components/document/page-heading.js b/gui/app/components/document/page-heading.js index 176e817f..08a1a067 100644 --- a/gui/app/components/document/page-heading.js +++ b/gui/app/components/document/page-heading.js @@ -44,8 +44,13 @@ export default Component.extend(Notifier, ModalMixin, { let authenticated = this.get('session.authenticated'); let notEmpty = this.get('pages.length') > 0; - if (notEmpty && authenticated && permissions.get('documentEdit') && this.get('document.protection') === constants.ProtectionType.None) return true; - if (notEmpty && authenticated && permissions.get('documentApprove') && this.get('document.protection') === constants.ProtectionType.Review) return true; + if (notEmpty && authenticated && permissions.get('documentEdit') + && (this.get('document.protection') !== constants.ProtectionType.Locked)) { + return true; + } + + // if (notEmpty && authenticated && permissions.get('documentEdit') && this.get('document.protection') === constants.ProtectionType.None) return true; + // if (notEmpty && authenticated && permissions.get('documentApprove') && this.get('document.protection') === constants.ProtectionType.Review) return true; return false; }),