1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-22 14:49:42 +02:00

Sync edit checks across editions

This commit is contained in:
McMatts 2019-10-21 10:34:10 +01:00
parent a3867c617a
commit 8c2bed283f

View file

@ -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;
}),