aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_admin_shell.lua
Commit message (Collapse)AuthorAgeFilesLines
* prosodyctl shell: More reliable detection of REPL/interactive mode (fixes #1895)Matthew Wild7 days1-4/+2
|
* mod_admin_shell: Remove outdated help text (fixes #1898)Matthew Wild7 days1-7/+2
| | | | | | | | The ! commands have been broken for some time, and we're not going to implement them right now. If we want fancier editing, we can now do that on the client side (with readline and stuff). Also removes mention of telnet!
* mod_admin_shell: Improve help listing in non-REPL modeMatthew Wild2025-02-171-2/+36
|
* mod_admin_shell: Fix simple command execution (e.g. help)Matthew Wild2025-02-171-3/+15
|
* mod_admin_shell: Set flag on session when in REPL modeMatthew Wild2025-02-171-0/+4
|
* mod_admin_shell: Improved error handling for shell-invoked commandsMatthew Wild2025-02-171-5/+25
|
* mod_admin_shell, util.prosodyctl.shell: Process command-line args on ↵Matthew Wild2025-02-171-18/+95
| | | | | | | | | | | | server-side, with argparse support This allow a shell-command to provide a 'flags' field, which will automatically cause the parameters to be fed through argparse. The rationale is to make it easier for more complex commands to be invoked from the command line (`prosodyctl shell foo bar ...`). Until now they were limited to accepting a list of strings, and any complex argument processing was non-standard and awkward to implement.
* mod_admin_shell: Remove duplicated lineMatthew Wild2025-02-131-2/+0
|
* mod_admin_shell: Rename user:setrole to user:set_rolesMatthew Wild2025-02-131-4/+4
| | | | | This is more readable and accessible, and it will only be harder to change after release.
* mod_admin_shell: Hide secondary role commands, focus on primary rolesMatthew Wild2025-02-131-7/+17
| | | | | | | | | Secondary roles are an advanced feature without any strong use cases currently. Having multiple ways to manage roles is confusing. Now the 'user:role' command will just show the primary role if that is all there is, but will list secondary roles too if there are any (which in 99.9% of cases there won't be).
* mod_admin_shell: Support for hiding certain commands from default help listingMatthew Wild2025-02-131-5/+8
| | | | Useful for e.g. deprecated commands.
* mod_admin_shell: Fix result handling of user addrole/delrole commandsMatthew Wild2025-02-131-2/+10
|
* mod_admin_shell: Fix column alignment in 'help roles'Kim Alvefur2025-02-021-1/+1
|
* mod_admin_shell: Fix help forgetting argumentsKim Alvefur2025-02-021-1/+1
| | | | | | The array:pluck() method mutates the args, replacing the table items with the resulting strings. On later runs I assume it tries to index the string, which returns nil, emptying the array.
* mod_admin_shell: Remove log statement intended for development onlyMatthew Wild2025-01-161-1/+0
|
* mod_admin_shell: Remove redundant 'mod_' prefix from debug messageKim Alvefur2025-01-081-1/+1
|
* mod_admin_shell: Fix reporting origin module for commandsKim Alvefur2025-01-081-1/+1
| | | | | | | The field `_provided_by` comes from module:provides(), but these items comes from moduel:add_item(), which include the originating module as a 'source' field of the event. However, this is absent when items are retrieved at a later time than the initial event.
* mod_admin_shell: user:password(): Support prompting for password if none givenMatthew Wild2025-01-071-6/+9
|
* mod_admin_shell: user:create(): Reject promise with error message on failureMatthew Wild2025-01-071-1/+1
|
* mod_admin_shell: Mark event as handled when requested input is submittedMatthew Wild2025-01-071-0/+1
|
* mod_admin_shell: user:create(): request password via prompt if none givenMatthew Wild2025-01-071-6/+7
|
* mod_admin_shell: Add session method to request (password) input from shell ↵Matthew Wild2025-01-071-0/+46
| | | | client
* mod_admin_shell: Don't pause async thread while waiting for promise resultMatthew Wild2025-01-071-14/+22
| | | | | | | | | | | This allows us to continue sending/receiving on the session, for example if the promise will be resolved by other data that the client is going to send. Specifically, this allows the repl-request-input to work without a deadlock. It does open the door to interleaved commands/results, which may not be a good thing overall, but can be restricted separately if necessary (e.g. a flag on the session).
* mod_admin_shell: stats:show(): Friendlier error message when statistics disabledMatthew Wild2024-12-281-1/+4
|
* mod_admin_shell: Report when a module is already loadedKim Alvefur2024-11-151-0/+6
| | | | Hopefully less confusing than "Module loaded onto 0 hosts"
* mod_admin_shell: Refactor end of module:loadKim Alvefur2024-11-151-1/+4
| | | | Meant to improve clarity and make improving easier
* mod_admin_shell: Reject attempt to add or remove roles for unrelated hostsKim Alvefur2024-11-011-0/+4
| | | | The three-argument version seems to be a left-over from 0.12
* mod_admin_shell: Allow assigning roles to arbitrary JIDs when supportedKim Alvefur2024-11-011-1/+5
| | | | mod_authz_internal does not support this
* mod_admin_shell: Prevent traceback due to type errorKim Alvefur2024-08-261-1/+2
| | | | Here too
* mod_admin_shell: Add connection created timeaidan2024-04-031-0/+12
| | | | | | This adds an output format option to show the time that the connection was created. Ref #1852
* mod_admin_shell: Fix linter issuesMatthew Wild2023-11-291-24/+26
|
* mod_admin_shell: Remove verbose loggingMatthew Wild2023-11-291-4/+0
|
* mod_admin_shell: Remove timer:info() (it's been debug:timers() for some time)Matthew Wild2023-11-291-3/+0
|
* mod_admin_shell: Support for 'shell-command' items (global and per-host)Matthew Wild2023-11-291-0/+169
| | | | | | This should simplify adding shell commands from other modules, which will reduce the growth of mod_admin_shell and make it easier for community modules to expose commands too.
* mod_admin_shell: Refactor help to data structures for extensibilityMatthew Wild2023-11-291-157/+239
| | | | | This makes it easier for commands added by other modules to add to the help output, for example.
* mod_admin_shell: Fix lint [luacheck]Kim Alvefur2023-11-211-10/+8
|
* mod_admin_shell: Add debug:async() command to show blocked async runnersMatthew Wild2023-11-211-0/+65
|
* mod_admin_shell: Make 'Role' column dynamically sizedKim Alvefur2023-10-261-1/+1
| | | | | | | Some of the new roles don't quite fit nicely into 4 characters (excluding ellipsis). Given the ability to dynamically add additional roles from the config and possibly from modules, it seems better to just make it a relative size since we can't know how long they will be.
* core, plugins: Split prosody:user role into prosody:{guest,registered,member}Matthew Wild2023-06-291-29/+11
| | | | | | | This gives us more granular control over different types of user account. Accounts registered by IBR get assigned prosody:registered by default, while accounts provisioned by an admin (e.g. via prosodyctl shell) will receive prosody:member by default.
* mod_admin_shell: Use new serialize preset to simplify default configKim Alvefur2023-06-091-2/+5
| | | | Two pairs replaced by one. Blame lua-format for the line diff delta.
* mod_admin_shell: Warn when (un-)loading module would be undone by restartKim Alvefur2023-06-061-0/+12
| | | | Reminder to update the configuration if the change is to be permanent.
* mod_admin_shell: Show internal URL where different from externalKim Alvefur2023-05-281-4/+8
|
* mod_admin_shell: Show internal URL in addition to external in http:listKim Alvefur2023-05-241-5/+8
| | | | To help with configuring reverse proxies.
* mod_admin_shell: Allow logging HTTP events with debug:logevents("http")Kim Alvefur2023-05-141-0/+3
| | | | | Mirroring debug:events("http"), and to replace the "Firing event: GET /" log lines in net.http.server
* mod_admin_shell: Allow logging global events with debug:logevents("*")Kim Alvefur2023-05-141-1/+5
| | | | Missing feature. It should behave like debug:events()
* mod_admin_shell: Refactor 'cert' columnKim Alvefur2023-04-301-4/+12
| | | | | | | | | | | | | | | | Removes some dead code and hopefully simplifies a bit. There's a tree of possibilities with the two tri-state status properties, something like chain: * nil -- cert validation disabled? * invalid -- something wrong with the chain (including ee cert) * valid -- chain ok cert: * nil -- incomplete validation?? * invalid -- mismatched names or such * valid -- all good!
* Merge 0.12->trunkKim Alvefur2023-04-191-1/+1
|\
| * mod_admin_shell: Fix display of remote cert status when expired etcKim Alvefur2023-04-061-1/+1
| | | | | | | | | | Looks like autocomplete unhelpfully capitalized this word, but it's lowercase where it is set in mod_s2s_auth_certs
* | mod_admin_shell: Use same wildcard matching in other s2s commandKim Alvefur2023-04-101-6/+5
| | | | | | | | Consistency is nice.
* | mod_admin_shell: Factor apart wildcard matching into function for reuseKim Alvefur2023-04-101-14/+18
| | | | | | | | Applying this for s2s:close[all]() would also be nice.