Software /
code /
prosody
File
teal-src/net/server.d.tl @ 12648:f299e570a0fe
mod_authz_internal: Use util.roles, some API changes and config support
This commit was too awkward to split (hg record didn't like it), so:
- Switch to the new util.roles lib to provide a consistent representation of
a role object.
- Change API method from get_role_info() to get_role_by_name() (touches
sessionmanager and usermanager)
- Change get_roles() to get_user_roles(), take a username instead of a JID
This is more consistent with all other usermanager API methods.
- Support configuration of custom roles and permissions via the config file
(to be documented).
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 19 Jul 2022 18:02:02 +0100 |
parent | 12610:e2fdcd386ebb |
line wrap: on
line source
local record server record LuaSocketTCP end record LuaSecCTX end record extra_settings end record interface end enum socket_type "tcp" "tcp6" "tcp4" end record listeners onconnect : function (interface) ondetach : function (interface) onattach : function (interface, string) onincoming : function (interface, string, string) ondrain : function (interface) onreadtimeout : function (interface) onstarttls : function (interface) onstatus : function (interface, string) ondisconnect : function (interface, string) end get_backend : function () : string type port = string | integer enum read_mode "*a" "*l" end type read_size = read_mode | integer addserver : function (string, port, listeners, read_size, LuaSecCTX) : interface addclient : function (string, port, listeners, read_size, LuaSecCTX, socket_type, extra_settings) : interface record listen_config read_size : read_size tls_ctx : LuaSecCTX tls_direct : boolean sni_hosts : { string : LuaSecCTX } end listen : function (string, port, listeners, listen_config) : interface enum quitting "quitting" end loop : function () : quitting closeall : function () setquitting : function (boolean | quitting) wrapclient : function (LuaSocketTCP, string, port, listeners, read_size, LuaSecCTX, extra_settings) : interface wrapserver : function (LuaSocketTCP, string, port, listeners, listen_config) : interface watchfd : function (integer | LuaSocketTCP, function (interface), function (interface)) : interface link : function () record config end set_config : function (config) end return server