0.1.139: Dev und Rechte scharf, Eigentuemer und Moderatoren eingetragen

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016onJCSHLwhs9udhC9ZLzk9
This commit is contained in:
Lacustat
2026-10-27 11:15:50 +01:00
co-authored by Claude Sonnet 5.5
parent e17ea437dd
commit ef7d631fe7
3 changed files with 24 additions and 5 deletions
+10
View File
@@ -132,6 +132,15 @@ end
-- Abfragen
------------------------------------------------------------------------
local function ModeratorKeys()
local set = {}
for _, n in ipairs(NS.Moderators or {}) do
local k = Trust.EntryKey(n)
if k then set[k] = true end
end
return set
end
function Trust.IsOwner(name)
local k = Trust.Key(name)
return k ~= nil and OwnerKeys()[k] == true
@@ -148,6 +157,7 @@ function Trust.RoleOf(name)
local entry = Data().list[k]
if entry and entry.role == "blocked" then return "blocked" end
if OwnerKeys()[k] then return "owner" end
if ModeratorKeys()[k] then return "moderator" end
return entry and entry.role or nil
end