(fix) minor fixes in tools
parent
91b32faac2
commit
784503bdbc
|
@ -184,9 +184,13 @@
|
|||
int max;
|
||||
|
||||
max = [arguments count];
|
||||
if (max > 0 && max < 3)
|
||||
if (max > 0)
|
||||
{
|
||||
delete = (max == 2);
|
||||
delete = [[arguments objectAtIndex: 0] isEqualToString: @"-d"];
|
||||
|
||||
if (delete && max > 1)
|
||||
arguments = RETAIN([arguments subarrayWithRange: NSMakeRange(1, max-1)]);
|
||||
|
||||
rc = [self fetchUserIDs: arguments];
|
||||
}
|
||||
else
|
||||
|
@ -272,6 +276,7 @@
|
|||
int count, max;
|
||||
NSString *basePath, *folder;
|
||||
|
||||
NSLog(@"Checking folders of user %@", uid);
|
||||
fm = [GCSFolderManager defaultFolderManager];
|
||||
basePath = [NSString stringWithFormat: @"/Users/%@", uid];
|
||||
folders = [fm listSubFoldersAtPath: basePath recursive: YES];
|
||||
|
@ -279,7 +284,6 @@
|
|||
for (count = 0; count < max; count++)
|
||||
{
|
||||
folder = [NSString stringWithFormat: @"%@/%@", basePath, [folders objectAtIndex: count]];
|
||||
//NSLog (@"folder %d: %@", count, folder);
|
||||
[self checkupFolder: folder withFM: fm];
|
||||
}
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ typedef enum
|
|||
" folder the folder - Calendar/<ID> or Contacst/<ID>\n"
|
||||
" user the user to get/set rights for - 'ALL', '<default>', 'anonymous' are supported\n"
|
||||
" rights rights to add\n\n"
|
||||
"Example: sogo-tool get jdoe Calendar/personal\n\n"
|
||||
"Example: sogo-tool manage-acl get jdoe Calendar/personal\n\n"
|
||||
"Note: You can add only one access right at the time. To set them all at once,\n"
|
||||
" invoke 'remove' first to remove them all.\n\n");
|
||||
}
|
||||
|
@ -217,8 +217,15 @@ typedef enum
|
|||
|
||||
u = [allSQLUsers objectAtIndex: count];
|
||||
|
||||
// We skip lookup for our 'system users' and the owner
|
||||
if ([u isEqualToString: @"anonymous"] || [u isEqualToString: @"<default>"] || [u isEqualToString: owner])
|
||||
// We skip lookup for our 'system users' but keep them to set ACLs
|
||||
if ([u isEqualToString: @"anonymous"] || [u isEqualToString: @"<default>"])
|
||||
{
|
||||
[allUsers addObject: u];
|
||||
continue;
|
||||
}
|
||||
|
||||
// Skip the owner
|
||||
if ([u isEqualToString: owner])
|
||||
continue;
|
||||
|
||||
infos = [lm contactInfosForUserWithUIDorEmail: u];
|
||||
|
|
Loading…
Reference in New Issue