Show privileges manager if protection not set up

This commit is contained in:
Mo Bitar
2018-12-17 18:08:54 -06:00
parent d3f97e7bae
commit 74fb3b6ca5
3 changed files with 27 additions and 15 deletions

View File

@@ -415,6 +415,13 @@ angular.module('app')
this.toggleProtectNote = function() {
this.note.content.protected = !this.note.content.protected;
this.changesMade({dontUpdateClientModified: true, dontUpdatePreviews: true});
// Show privilegesManager if Protection is not yet set up
privilegesManager.actionHasPrivilegesConfigured(PrivilegesManager.ActionViewProtectedNotes).then((configured) => {
if(!configured) {
privilegesManager.presentPrivilegesManagementModal();
}
})
}
this.toggleNotePreview = function() {