marinofaggiana 5 жил өмнө
parent
commit
699f461a7e

+ 6 - 2
iOSClient/AppDelegate.m

@@ -942,8 +942,12 @@ PKPushRegistry *pushRegistry;
     // Test Maintenance
     if (self.maintenanceMode)
         return;
-        
-    (void)[[NCCreateMenuAdd alloc] initWithViewController:self.window.rootViewController view:[(UIButton *)sender superview]];
+    
+    tableDirectory *tableDirectory = [[NCManageDatabase sharedInstance] getTableDirectoryWithPredicate:[NSPredicate predicateWithFormat:@"account == %@ AND serverUrl == %@", self.activeAccount, self.activeMain.serverUrl]];
+    
+    if ([tableDirectory.permissions containsString:@"CK"]) {
+        (void)[[NCCreateMenuAdd alloc] initWithViewController:self.window.rootViewController view:[(UIButton *)sender superview]];
+    }
 }
 
 - (void)selectedTabBarController:(NSInteger)index