[pbs-devel] [PATCH proxmox 5/5] access: increment user cache generation when saving acl config
Shannon Sterz
s.sterz at proxmox.com
Mon Jun 10 17:42:14 CEST 2024
since `CachedUserInfo` takes care of both, the user config and the acl
config, we need to also bump the cache generation when storing the
acl config.
Signed-off-by: Shannon Sterz <s.sterz at proxmox.com>
---
proxmox-access/src/acl.rs | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/proxmox-access/src/acl.rs b/proxmox-access/src/acl.rs
index 8cfb4fe7..6489a1a1 100644
--- a/proxmox-access/src/acl.rs
+++ b/proxmox-access/src/acl.rs
@@ -641,6 +641,11 @@ pub fn save_config(acl: &AclTree) -> Result<(), Error> {
let conf = acl_config();
replace_privileged_config(conf, &raw)?;
+ // increase user version
+ // We use this in CachedUserInfo
+ let version_cache = crate::ConfigVersionCache::new()?;
+ version_cache.increase_user_cache_generation();
+
Ok(())
}
--
2.39.2
More information about the pbs-devel
mailing list