1
0
Fork 0
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:
sauls8t 2018-12-20 13:05:22 +00:00
parent 2042454e77
commit 3c81297fc6
19 changed files with 288 additions and 190 deletions

View file

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