Browse Source

New check E2EE directory

Marino Faggiana 7 years ago
parent
commit
9f16a08a30

+ 8 - 1
iOSClient/Main/CCMain.m

@@ -5315,7 +5315,7 @@
 {
     NSString *nomeDir;
 
-    if(self.tableView.editing == NO) {
+    if (self.tableView.editing == NO) {
         
         NSString *serverUrl = [[NCManageDatabase sharedInstance] getServerUrl:_metadata.directoryID];
         if (!serverUrl) return;
@@ -5358,6 +5358,13 @@
             return;
         }
         
+        // E2EE Check enable
+        if (_metadata.e2eEncrypted && [CCUtility isEndToEndEnabled:appDelegate.activeAccount] == NO) {
+            
+            [appDelegate messageNotification:@"_info_" description:@"_e2e_goto_settings_for_enable_" visible:YES delay:k_dismissAfterSecond type:TWMessageBarMessageTypeInfo errorCode:0];
+            return;
+        }
+        
         nomeDir = _metadata.fileName;
         
         NSString *serverUrlPush = [CCUtility stringAppendServerUrl:serverUrl addFileName:nomeDir];

+ 1 - 1
iOSClient/Supporting Files/en.lproj/Localizable.strings

@@ -510,7 +510,7 @@
 "_e2e_settings_remove_message_"     = "Confirm removal of encryption along with the passphrase.";
 "_e2e_set_folder_encrypted_"        = "Encrypt";
 "_e2e_remove_folder_encrypted_"     = "Decrypt";
-"_e2e_goto_settings_for_enable_"    = "You are in an encrypted directory, go to \"Settings\" and enable end-to-end encryption";
+"_e2e_goto_settings_for_enable_"    = "This is an encrypted directory, go to \"Settings\" and enable end-to-end encryption";
 "_e2e_delete_folder_not_permitted_" = "Deletion of the directory marked as 'encrypted' is not allowed";
 "_e2e_remove_folder_lock_"          = "Force remove folder lock";
 "_e2e_error_encode_metadata_"       = "Serious internal error in encoding metadata";