# HG changeset patch # User Matthew Wild # Date 1680720313 -3600 # Node ID 210aeb5afe429421788b2fa021afbf445ed502ee # Parent 9b9f35aaeb913de76f6adf4885ca2036e15bc97d mod_client_management: Fail to revoke clients that have used passwords Return an error so the caller can take appropriate action, e.g. encouraging the user to change their password. diff -r 9b9f35aaeb91 -r 210aeb5afe42 mod_client_management/mod_client_management.lua --- a/mod_client_management/mod_client_management.lua Wed Apr 05 19:42:16 2023 +0100 +++ b/mod_client_management/mod_client_management.lua Wed Apr 05 19:45:13 2023 +0100 @@ -294,6 +294,9 @@ local ok = tokenauth.revoke_grant(username, status.grant.id); if not ok then return nil, "internal-server-error"; end end + if status.password then + return nil, "password-reset-required"; + end return true; elseif c_type == "grant" then local grant = tokenauth.get_grant_info(username, c_id);