From 0ce6a61fcba6fd52ccfed2f3a908f1024a289ca7 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Sun, 3 May 2026 10:21:41 +0300 Subject: [PATCH] Also allow clients to load /inode/stats/ for their inodes --- mon/vitastor_auth_filter.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mon/vitastor_auth_filter.js b/mon/vitastor_auth_filter.js index 2de29a5b..259cc5c6 100644 --- a/mon/vitastor_auth_filter.js +++ b/mon/vitastor_auth_filter.js @@ -303,6 +303,18 @@ class VitastorAuthFilter } return false; } + if (key.substr(0, 13) == '/inode/stats/') + { + const [ pool_id, id ] = key.substr(13).split('/'); + const inode = this._get([ ...this.prefix_parts, 'config', 'inode', pool_id, id ], true); + if (inode && (inode.reader_group && userInfo.groups[inode.reader_group] || + inode.owner_group && userInfo.groups[inode.owner_group] || + inode.owner === userInfo.name)) + { + return true; + } + return false; + } } return false; }