Mercurial > prosody-modules
comparison mod_protect_last_admin/mod_protect_last_admin.lua @ 6328:187b957dc528
mod_protect_last_admin: Switch to service-unavailable rather than policy-violation
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Tue, 30 Sep 2025 15:55:57 +0100 |
| parents | 4f6fb56572f7 |
| children | d1f64ffca879 |
comparison
equal
deleted
inserted
replaced
| 6327:4f6fb56572f7 | 6328:187b957dc528 |
|---|---|
| 8 | 8 |
| 9 local errors = require "prosody.util.error".init(module.name, { | 9 local errors = require "prosody.util.error".init(module.name, { |
| 10 ["cannot-remove-only-admin"] = { | 10 ["cannot-remove-only-admin"] = { |
| 11 code = 400; | 11 code = 400; |
| 12 type = "cancel"; | 12 type = "cancel"; |
| 13 condition = "policy-violation"; | 13 condition = "service-unavailable"; |
| 14 text = "Cannot remove the only administrator"; | 14 text = "Cannot remove the only administrator"; |
| 15 extra = { | 15 extra = { |
| 16 namespace = "https://prosody.im/protocol/errors"; | 16 namespace = "https://prosody.im/protocol/errors"; |
| 17 condition = "cannot-remove-only-admin"; | 17 condition = "cannot-remove-only-admin"; |
| 18 }; | 18 }; |
