mirror of
https://github.com/documize/community.git
synced 2025-07-19 13:19:43 +02:00
Quick-abort space settings save operation if no permission
This commit is contained in:
parent
419ce1bbb5
commit
ecc306136a
1 changed files with 1 additions and 9 deletions
|
@ -30,21 +30,13 @@ export default Component.extend(Notifier, {
|
|||
actions: {
|
||||
onSave() {
|
||||
if (this.get('hasNameError')) return;
|
||||
|
||||
let constants = this.get('constants');
|
||||
if (!this.get('permissions.documentEdit')) return;
|
||||
|
||||
this.set('document.name', this.get('docName'));
|
||||
this.set('document.excerpt', this.get('docExcerpt').trim());
|
||||
|
||||
let lifecycle = this.get('lifecycle.selected');
|
||||
this.set('document.lifecycle', lifecycle);
|
||||
|
||||
let cb = this.get('onSaveDocument');
|
||||
cb(this.get('document'));
|
||||
|
||||
if (lifecycle === constants.Lifecycle.Draft) {
|
||||
this.get('activitySvc').clearChangeHistory(this.get('document.id'));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue