|
@@ -362,16 +362,15 @@ extension AppDelegate {
|
|
|
} else if action == NSSelectorFromString("menuItemAction_addPassword:") {
|
|
|
|
|
|
} else if action == NSSelectorFromString("menuItemAction_removePassword:") {
|
|
|
- if mainVC.listView.document.isLocked == true {
|
|
|
+ if mainVC.listView.document.isLocked == true || mainVC.listView.document.isEncrypted == true {
|
|
|
return true
|
|
|
- } else {
|
|
|
- if let pw = mainVC.listView.document.password {
|
|
|
- return true
|
|
|
- }
|
|
|
- return false
|
|
|
}
|
|
|
+ return false
|
|
|
} else if action == NSSelectorFromString("menuItemAction_unlockFunction:") {
|
|
|
- return mainVC.listView.document.isEncrypted
|
|
|
+ if mainVC.listView.document.permissionsStatus != .owner {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return false
|
|
|
} else if action == NSSelectorFromString("menuItemAction_searchPDF:") {
|
|
|
|
|
|
} else if action == NSSelectorFromString("menuItemAction_performFindPanelAction:") {
|