mirror of
https://github.com/floci-io/floci.git
synced 2026-11-28 08:09:43 -05:00
fix(storage): record the owning account on putAll, so a cross-account lookup finds the entries (#7520)
This commit is contained in:
1 parent
5762323bb5
commit
fab3e7b923
2 files changed
+34
-4
No files matched your search
+2
-4
@@ -77,10 +77,7 @@ public class AccountAwareStorageBackend<V> implements StorageBackend<String, V>
|
||||
|
||||
@Override
|
||||
public void putAll(Map<String, V> entries) {
|
||||
String prefix = prefix() + "/";
|
||||
Map<String, V> prefixedEntries = new LinkedHashMap<>();
|
||||
entries.forEach((key, value) -> prefixedEntries.put(prefix + key, value));
|
||||
delegate.putAll(prefixedEntries);
|
||||
putAllForAccount(prefix(), entries);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -448,6 +445,7 @@ public class AccountAwareStorageBackend<V> implements StorageBackend<String, V>
|
||||
Map<String, V> prefixedEntries = new LinkedHashMap<>();
|
||||
entries.forEach((key, value) -> prefixedEntries.put(prefix + key, value));
|
||||
delegate.putAll(prefixedEntries);
|
||||
trackOwner(accountId);
|
||||
}
|
||||
|
||||
public void deleteForAccount(String accountId, String key) {
|
||||
|
||||
Reference in new issue
Block a user