Kim Alvefur
701fb4fce0
mod_admin_shell: Add commands to disable and enable accounts
...
First proper UI to enable/disable, allowing it to be tested.
3 years ago
Kim Alvefur
dc958f1e40
mod_admin_shell: Match substring in muc:affiliations() like muc:occupants()
...
Maybe one day we'll get consistent filtering semantics everywhere.
3 years ago
Kim Alvefur
1b71a53fb7
mod_admin_shell: Sort MUC users by relation and JID
...
Suggested by MattJ, our resident UI expert :)
3 years ago
Kim Alvefur
5c676bab58
mod_admin_shell: Make Role and Affiliation columns the same width for aesthetics
...
The length of the title "Affiliation" made them both close enough that
it looked off.
3 years ago
Kim Alvefur
6e120ad485
mod_admin_shell: Use tables to present MUC users
...
Tables are awesome!
3 years ago
Kim Alvefur
d5b5b5ba86
mod_admin_shell: Factor out room retrieval into common function
...
Justification: See diffstat
3 years ago
Kim Alvefur
08a730746c
mod_admin_shell: Add muc:affiliations(room) command to list memberships
...
Easier than going trough muc:room():each_affiliation() since you have to
do fiddly things to reach the print() function.
3 years ago
Kim Alvefur
2b0584d2ee
mod_admin_shell: Add muc:occupants(room) command to list occupants
...
Easier than going trough muc:room():each_occupant() since you have to do
fiddly things to reach the print() function.
3 years ago
Kim Alvefur
8b82dc338c
mod_admin_shell: Fix display of session without role (thanks Link Mauve)
...
This can happen to sessions before they are assigned a role
3 years ago
Kim Alvefur
95bba786f1
mod_admin_shell: Rename variable to avoid confusion with global function
...
For luacheck, but it doesn't actually complain about this right now
3 years ago
Kim Alvefur
b292127500
mod_admin_shell: Fix output from user:roles()
...
It used _G.print instead of the shell session print, which would
silently write to stdout
3 years ago
Kim Alvefur
96e172167d
mod_admin_shell: Ensure account has role before it is usable
...
By creating the account first without a password it can't be used until
the role has set. This is most important for restricted accounts, as a
failure to set the role would lead to the account having more privileges
than indented.
3 years ago
Kim Alvefur
6f11c198b3
mod_admin_shell: Update help for user:create to reflect singular role argument
3 years ago
Matthew Wild
4db3f8cf46
mod_admin_shell: Update with new role management commands and help text
3 years ago
Kim Alvefur
1fac00b2af
mod_admin_shell: Show session role in c2s:show
3 years ago
Kim Alvefur
0e7e43f62f
mod_admin_shell: Remove obsolete module:load() argument from 0.8 time
...
This 'config' argument was removed without explanation in d8dbf569766c
3 years ago
Kim Alvefur
5251c9b686
compat: Remove handling of Lua 5.1 location of 'unpack' function
4 years ago
Kim Alvefur
d0ab468f40
mod_admin_shell: Show session id ping reply came
...
To point out which one when more than one connection was established, or
if it's an existing connection, allows correlation with s2s:show() or
with logs.
4 years ago
Kim Alvefur
b0c116f47b
mod_admin_shell: Include last (mod_cron) task run time in module:info()
...
Don't think this is otherwise shown anywhere outside of debug logs
4 years ago
Kim Alvefur
3717f5872a
mod_admin_shell: Drop unused argument [luacheck]
4 years ago
Kim Alvefur
b7bd70874a
mod_admin_shell: Show bound ports in module:info
...
I.e. the subset of port:list() relevant to the specified module.
4 years ago
Kim Alvefur
8ba6d3a2b1
mod_admin_shell: Document the 'watch' section in the built-in help
4 years ago
Kim Alvefur
0267554c8e
prosodyctl shell: Communicate width of terminal to mod_admin_shell
...
This lets it adjust the width of tables to the actual terminal width.
4 years ago
Jonas Schäfer
38346dd6f1
net: isolate LuaSec-specifics
...
For this, various accessor functions are now provided directly on the
sockets, which reach down into the LuaSec implementation to obtain the
information.
While this may seem of little gain at first, it hides the implementation
detail of the LuaSec+LuaSocket combination that the actual socket and
the TLS layer are separate objects.
The net gain here is that an alternative implementation does not have to
emulate that specific implementation detail and "only" has to expose
LuaSec-compatible data structures on the new functions.
4 years ago
Matthew Wild
1ef09e4285
mod_admin_shell: Add watch:stanzas() command
4 years ago
Kim Alvefur
f9478ab242
mod_admin_shell: Squeeze some characters out of the Certificate column
...
The more compact these are, the better
4 years ago
Kim Alvefur
89c2a5ac30
mod_admin_shell: Fix description of muc:room() (thanks Link Mauve)
...
But then this is the internal API which is weird and unfriendly to
expose externally. Lots of methods to wrap tho ... one day.
4 years ago
Kim Alvefur
fd5a0f6a06
mod_admin_shell: Track connected events instead of created
...
The connection events are more appropriate here, where the s2s-created
events happens a bit later or earlier in a sessions lifetime depending
on its direction and for outgoing connections isn't actually the
creation time (which happens immediately after pressing enter, so not
very interesting), but rather closer to the connection time.
4 years ago
Kim Alvefur
0bff4f57cc
mod_admin_shell: Fix typo in comment [codespell]
4 years ago
Kim Alvefur
8fbf286e64
mod_admin_shell: Add descriptions of each column to 'help columns'
...
Since some of the titles are quite dense
4 years ago
Kim Alvefur
b5a87898ee
mod_admin_shell: Use exact match instead of Lua patterns in c2s,s2s:show
...
It is unexpected that 'example.com' matches 'exampleicom.org' and this
use of Lua patterns is undocumented and unlikely to be widely known or
used.
4 years ago
Kim Alvefur
46ad556ca0
mod_admin_shell: Fix traceback on rendering graph of stats without extra labels
...
Stops an error when extra_labels is nil since it attempts to index it
Unsure about correctness
4 years ago
Kim Alvefur
d9f7b26328
mod_admin_shell: Add help section about stats
4 years ago
Kim Alvefur
09d7e131d0
mod_admin_shell: Add help section about customizing table columns
4 years ago
Kim Alvefur
7a706aecec
mod_admin_shell: Add command to show current user roles
4 years ago
Kim Alvefur
1809c0460f
mod_admin_shell: Add help section about roles
...
As in the argument to user:create() and user:roles()
Tricky to come up with something sensible to write when Prosody core
only knows of the 'prosody:admin' role so far.
4 years ago
Kim Alvefur
28bd099515
mod_admin_shell: Log creation of incoming s2s connections during ping
...
The 's2s-created' fires just after accepting the TCP connection, before
the addresses are known, so this can have some false positives.
4 years ago
Kim Alvefur
257f52d826
mod_admin_shell: Print s2s related events while waiting for ping
...
Gives a better idea of what's taking time.
4 years ago
Kim Alvefur
6e0bbc2af5
mod_smacks: Limit queue memory consumption using new util
...
This brings back the queue size limit that was once added, then removed
because destroying the session when reaching the limit was not great.
Instead, the queue wraps and overwrites the oldest unacked stanza on the
assumption that it will probably be acked anyway and thus does not need
to be delivered. If those discarded stanzas turn out to be needed on
resumption then the resumption fails.
4 years ago
Kim Alvefur
1ffb6f0b3d
mod_admin_shell: Add port as a c2s/s2s:show column definition
...
Allows inferring whether Direct TLS was used, or perhaps which SRV
record was chosen. Not shown by default.
4 years ago
Kim Alvefur
9f2249b3db
mod_admin_shell: Handle global roles (pass host=*)
...
Is it not odd that um.set_roles() takes `nil` to mean global?
4 years ago
Kim Alvefur
a45484c131
mod_admin_shell: Only check that local users exist locally
4 years ago
Kim Alvefur
cf137f9902
mod_admin_shell: Support setting roles on hosts other than the users'
...
Needed to e.g. grant admin rights on a component, or grant non-local
users local privileges.
Leave the same host syntax for convenience, since this might be the
common case.
4 years ago
Kim Alvefur
efa1f442ae
mod_admin_shell: Add command for updating roles user:roles(jid, roles)
...
This would allow e.g. granting admin status without changing the config
and without a restart.
4 years ago
Kim Alvefur
95fae62ac5
mod_admin_shell: Allow setting roles when creating user
4 years ago
Kim Alvefur
2f274d8026
mod_admin_shell: List periodic tasks in module:info
4 years ago
Kim Alvefur
3f4a73c66b
mod_admin_shell: Remove now redundant promise awaiting in dns:lookup()
4 years ago
Kim Alvefur
769a3ed263
mod_admin_shell: Remove now redundant promise awaiting in xmpp:ping()
4 years ago
Kim Alvefur
bdc838bf11
mod_admin_shell: Fix indentation
...
It was all of for some reason
4 years ago
Kim Alvefur
aac203f0d9
mod_admin_shell: Wait for promises
...
I've typed `>require"util.async".wait_for(...)` for the last time!
4 years ago