Browse Source

E2E : the start of e2e required the Lock: Active on “Settings”

Marino Faggiana 7 years ago
parent
commit
e1fdc2468b
1 changed files with 12 additions and 1 deletions
  1. 12 1
      iOSClient/Settings/NCManageEndToEndEncryption.m

+ 12 - 1
iOSClient/Settings/NCManageEndToEndEncryption.m

@@ -183,7 +183,18 @@
 {
 {
     [self deselectFormRow:sender];
     [self deselectFormRow:sender];
 
 
-    [app.endToEndInterface initEndToEndEncryption];
+    if ([[CCUtility getBlockCode] length]) {
+        
+        [app.endToEndInterface initEndToEndEncryption];
+        
+    } else {
+        
+        UIAlertController *alertController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"_info_", nil) message:NSLocalizedString(@"_e2e_settings_lock_not_active_", nil) preferredStyle:UIAlertControllerStyleAlert];
+        UIAlertAction *okAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"OK", @"OK action") style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
+        }];
+        [alertController addAction:okAction];
+        [self presentViewController:alertController animated:YES completion:nil];
+    }
 }
 }
 
 
 - (void)readPassphrase:(XLFormRowDescriptor *)sender
 - (void)readPassphrase:(XLFormRowDescriptor *)sender