Refuse to add a password if PGP key and Git repo are not properly set

This commit is contained in:
Bob Sun 2017-04-05 19:33:06 -07:00
parent ab0321e518
commit bdf8683d4e
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4
2 changed files with 47 additions and 42 deletions

View file

@ -399,6 +399,11 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
}
return false
}
} else if identifier == "addPasswordSegue" {
guard self.passwordStore.publicKey != nil, self.passwordStore.storeRepository != nil else {
Utils.alert(title: "Cannot Add Password", message: "Please make sure PGP Key and Git Server are properly set.", controller: self, completion: nil)
return false
}
}
return true
}