浏览代码

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

Marino Faggiana 7 年之前
父节点
当前提交
e1fdc2468b
共有 1 个文件被更改,包括 12 次插入1 次删除
  1. 12 1
      iOSClient/Settings/NCManageEndToEndEncryption.m

+ 12 - 1
iOSClient/Settings/NCManageEndToEndEncryption.m

@@ -183,7 +183,18 @@
 {
     [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