mod_client_management: Use grant id from key
This is a minor tweak - it's faster and preserves compatibility with older
data formats (that we don't necessarily want to be compatible with, but some
of us have messy data stores and it pays to be a little more robust).
--- a/mod_client_management/mod_client_management.lua Wed Apr 05 19:45:13 2023 +0100
+++ b/mod_client_management/mod_client_management.lua Thu Apr 06 15:20:25 2023 +0100
@@ -243,7 +243,7 @@
for grant_id, grant in pairs(tokenauth.get_user_grants(username) or {}) do
if not used_grants[grant_id] then -- exclude grants already accounted for
table.insert(active_clients, {
- id = "grant/"..grant.id;
+ id = "grant/"..grant_id;
type = "access";
first_seen = grant.created;
last_seen = grant.accessed;