# HG changeset patch # User Kim Alvefur # Date 1677159875 -3600 # Node ID 13950bf92802ebc58cb453aedafd63f94467720e # Parent 0a0a251bcd6cc101a3557e116757da1814e786fd mod_auth_internal_hashed: Implement methods to enable and disable users diff -r 0a0a251bcd6c -r 13950bf92802 plugins/mod_auth_internal_hashed.lua --- a/plugins/mod_auth_internal_hashed.lua Thu Feb 23 14:34:10 2023 +0100 +++ b/plugins/mod_auth_internal_hashed.lua Thu Feb 23 14:44:35 2023 +0100 @@ -117,12 +117,17 @@ return info.enabled; end -function provider.enable(username) -- luacheck: ignore 212 - error "NYI" +function provider.enable(username) + -- TODO map store? + local account = accounts:get(username); + account.disabled = nil; + return accounts:set(username, account); end -function provider.disable(username) -- luacheck: ignore 212 - error "NYI" +function provider.disable(username) + local account = accounts:get(username); + account.disabled = true; + return accounts:set(username, account); end function provider.users()