marinofaggiana 5 年之前
父節點
當前提交
699f461a7e
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. 6 2
      iOSClient/AppDelegate.m

+ 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