mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-11-21 06:52:40 +00:00
(sogo-tool) Fix ACLs restore in single store mode
Fixes #4256 Fixes #4385 Fixes #4390
This commit is contained in:
1 parent
b8958b931e
commit
f31892044b
3 files changed
+16
-6
No files matched your search
+12
-5
@@ -348,11 +348,18 @@
|
||||
userRoles = [[acl objectForKey: currentUser] objectEnumerator];
|
||||
while ((currentRole = [userRoles nextObject]))
|
||||
{
|
||||
SQL = [NSString stringWithFormat: @"INSERT INTO %@"
|
||||
@" (c_object, c_uid, c_role)"
|
||||
@" VALUES ('%@', '%@', '%@')",
|
||||
aclTableName,
|
||||
folderPath, currentUser, currentRole];
|
||||
if ([GCSFolderManager singleStoreMode])
|
||||
SQL = [NSString stringWithFormat: @"INSERT INTO %@"
|
||||
@" (c_object, c_uid, c_role, c_folder_id)"
|
||||
@" VALUES ('%@', '%@', '%@', %@)",
|
||||
aclTableName,
|
||||
folderPath, currentUser, currentRole, [gcsFolder folderId]];
|
||||
else
|
||||
SQL = [NSString stringWithFormat: @"INSERT INTO %@"
|
||||
@" (c_object, c_uid, c_role)"
|
||||
@" VALUES ('%@', '%@', '%@')",
|
||||
aclTableName,
|
||||
folderPath, currentUser, currentRole];
|
||||
[channel evaluateExpressionX: SQL];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user