mirror of
https://github.com/documize/community.git
synced 2025-07-22 22:59:43 +02:00
Sync edit checks across editions
This commit is contained in:
parent
a3867c617a
commit
8c2bed283f
1 changed files with 7 additions and 2 deletions
|
@ -44,8 +44,13 @@ export default Component.extend(Notifier, ModalMixin, {
|
||||||
let authenticated = this.get('session.authenticated');
|
let authenticated = this.get('session.authenticated');
|
||||||
let notEmpty = this.get('pages.length') > 0;
|
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('documentEdit')
|
||||||
if (notEmpty && authenticated && permissions.get('documentApprove') && this.get('document.protection') === constants.ProtectionType.Review) return true;
|
&& (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;
|
return false;
|
||||||
}),
|
}),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue