Software /
code /
prosody-modules
Comparison
mod_client_management/mod_client_management.lua @ 5312:22e6b9f09439
mod_client_management: Add list-clients + manage-clients permissions to users
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 06 Apr 2023 16:10:27 +0100 |
parent | 5311:d4a0d2b5343a |
child | 5343:5c1c70e52635 |
comparison
equal
deleted
inserted
replaced
5311:d4a0d2b5343a | 5312:22e6b9f09439 |
---|---|
7 local it = require "util.iterators"; | 7 local it = require "util.iterators"; |
8 local jid = require "util.jid"; | 8 local jid = require "util.jid"; |
9 local st = require "util.stanza"; | 9 local st = require "util.stanza"; |
10 | 10 |
11 local strict = module:get_option_boolean("enforce_client_ids", false); | 11 local strict = module:get_option_boolean("enforce_client_ids", false); |
12 | |
13 module:default_permission("prosody:user", ":list-clients"); | |
14 module:default_permission("prosody:user", ":manage-clients"); | |
12 | 15 |
13 local tokenauth = module:depends("tokenauth"); | 16 local tokenauth = module:depends("tokenauth"); |
14 local mod_fast = module:depends("sasl2_fast"); | 17 local mod_fast = module:depends("sasl2_fast"); |
15 | 18 |
16 local client_store = assert(module:open_store("clients", "keyval+")); | 19 local client_store = assert(module:open_store("clients", "keyval+")); |