mirror of
https://github.com/documize/community.git
synced 2025-07-19 13:19:43 +02:00
Move revisions to new ui framework
This commit is contained in:
parent
2042454e77
commit
3c81297fc6
19 changed files with 288 additions and 190 deletions
|
@ -11,6 +11,7 @@
|
|||
|
||||
import $ from 'jquery';
|
||||
import { inject as service } from '@ember/service';
|
||||
import { computed } from '@ember/object';
|
||||
import AuthMixin from '../../mixins/auth';
|
||||
import ModalMixin from '../../mixins/modal';
|
||||
import Notifier from '../../mixins/notifier';
|
||||
|
@ -24,6 +25,14 @@ export default Component.extend(ModalMixin, AuthMixin, Notifier, {
|
|||
pinned: service(),
|
||||
browserSvc: service('browser'),
|
||||
documentSvc: service('document'),
|
||||
showRevisions: computed('permissions', 'document.protection', function() {
|
||||
if (!this.get('session.authenticated')) return false;
|
||||
if (!this.get('session.viewUsers')) return false;
|
||||
if (this.get('document.protection') === this.get('constants').ProtectionType.None) return true;
|
||||
if (this.get('document.protection') === this.get('constants').ProtectionType.Review && this.get('permissions.documentApprove')) return true;
|
||||
|
||||
return false;
|
||||
}),
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue