mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-02-17 07:33:57 +00:00
chore(tool): add the possibility to force the sieve script activation
This commit is contained in:
@@ -68,6 +68,7 @@ typedef enum
|
||||
" -p credentialFile Specify the file containing the sieve admin credentials\n"
|
||||
" The file should contain a single line:\n"
|
||||
" username:password\n"
|
||||
" -F force the activation of the sieve script in case external scripts. Must be the las targument after -p credentialsFile"
|
||||
" Examples:\n"
|
||||
" sogo-tool user-preferences get defaults janedoe SOGoLanguage\n"
|
||||
" sogo-tool user-preferences unset settings janedoe Mail\n"
|
||||
@@ -144,9 +145,19 @@ typedef enum
|
||||
account = [folder lookupName: @"0" inContext: localContext acquire: NO];
|
||||
[account setContext: localContext];
|
||||
|
||||
error = [account updateFiltersWithUsername: authname
|
||||
andPassword: authpwd
|
||||
forceActivation: NO];
|
||||
if([[arguments lastObject] isEqualToString: @"-F"])
|
||||
{
|
||||
error = [account updateFiltersWithUsername: authname
|
||||
andPassword: authpwd
|
||||
forceActivation: YES];
|
||||
}
|
||||
else
|
||||
{
|
||||
error = [account updateFiltersWithUsername: authname
|
||||
andPassword: authpwd
|
||||
forceActivation: NO];
|
||||
}
|
||||
|
||||
if (error)
|
||||
return NO;
|
||||
}
|
||||
|
||||
@@ -114,8 +114,7 @@
|
||||
if (count < max)
|
||||
{
|
||||
max -= count;
|
||||
toolArguments = [arguments
|
||||
subarrayWithRange: NSMakeRange (count, max)];
|
||||
toolArguments = [arguments subarrayWithRange: NSMakeRange (count, max)];
|
||||
[toolArguments retain];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user