25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-10-31 15:21:38 +01:00
Commit Graph

132 Commits

Author SHA1 Message Date
Mickael Remond
39640b67c7
Add support for rich error reporting for API 2016-07-30 13:08:30 +02:00
Christophe Romain
8a6c51290a Pass noauth when auth isn't provided 2016-05-02 15:07:00 +02:00
Badlop
e5e4f39c01 Remove --auth in ejabberd_ctl.erl as it's useless, still useful for mod_rest 2016-04-15 15:35:57 +02:00
Badlop
8c8a6869be process2/2 is needed by mod_rest to provide its own AccessCommands
See processone/ejabberd-contrib#161
2016-04-11 17:21:44 +02:00
Alexey Shchepin
3dc55c6d47 Commands refactor, first pass.
- add API versionning
- changed error handling, based on exception
- commands moved/merged from mod_admin_p1 to mod_admin_extra
- command bufixes
- add some elixir unit test cases

Squashed commit of the following:

commit dd59855b3486f78a9349756e4f102e79b3accff8
Merge: 14e8ffc 506e08e
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Fri Oct 30 11:43:18 2015 +0100

    Merge branch '3.2.x' into api

commit 14e8ffce78cbea6c8605371d1fc50a0c1d1e012c
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Tue Oct 27 16:35:17 2015 +0100

    Added OAuth tests to ejabberd_commands

commit f81c550c14628edfe4861c228576cb767924366a
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Tue Oct 27 16:34:55 2015 +0100

    Added some mod_http_api tests

commit 6a64578d5b2ba532a2feb6503ed98561e56d5d53
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Mon Oct 26 15:29:36 2015 +0100

    Fix get_last command test

    Previous version won't work with dst.

commit 27e0cde9e9c1f001effe68f8424a365ad947c068
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Fri Oct 23 17:59:34 2015 +0200

    Add tests on admin command policy

commit 19dad8d54f54c9fabd454280483cccfb06c8e78a
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Fri Oct 23 16:49:36 2015 +0200

    Added command related tests (http api & user policy)

commit e0e596ab4a3f3a70aba5f374f028939ab794de33
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Fri Oct 23 16:49:16 2015 +0200

    Fix command call.

commit 128cd7d1ede3c47a34f8ec3a750c980ccad2c61d
Merge: 60c4c4c 447313c
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Thu Oct 22 14:48:39 2015 +0200

    Merge branch '3.2.x' into api

commit 60c4c4c0751302524c14219c6bc8c56a6069a689
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Thu Oct 22 14:45:57 2015 +0200

    Fix ejabberd_commands spec.

commit 8e145c28c5da762c2b93ee32327eff1db94ebfed
Merge: 397273a f13dc94
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Wed Oct 21 18:26:07 2015 +0200

    Merge branch '3.2.x' into api

commit 397273a23ed415feac87aed33da6452229793387
Merge: c30e89b f289e27
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Wed Oct 21 15:27:45 2015 +0200

    Merge branch '3.2.x' into api

commit c30e89bb8a0013bff37e61e4c6953350c9c1f313
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Wed Oct 21 12:47:02 2015 +0200

    Merge mod_http_api

commit 7b0db22b4acd48ff6fabce41c1b2525e6580a3c5
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Fri Oct 16 11:55:48 2015 +0200

    Fix exunit tests to run with common_test suites

commit d8b1a89800ac7379a57a7eb4a09c3c93c3e1e5eb
Merge: 2879ae8 63455b3
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Thu Oct 15 11:39:45 2015 +0200

    Merge branch '3.2.x' into api

commit 2879ae87ff3eee369ef3d780136b96ecff5285d1
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Wed Oct 14 14:53:44 2015 +0200

    Fix update_roster command.

commit a1d453dd7a3afda9861a8d747494a45057ad574b
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Tue Oct 13 16:14:28 2015 +0200

    API commands refactor

    Moving and/or merging commands from mod_admin_p1 to mod_admin_extra

commit b709ed26b0fc0ca4f3bdd5a59fa58ec7e3db97fa
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Wed Oct 7 15:10:01 2015 +0200

    Add tests on commands

commit 6711687bee9c672cb3d5aed0744e13420ecf6dbd
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Tue Sep 29 15:58:16 2015 +0200

    Add ejabberd_commands tests

commit df8682f419cf3877e77e36a19bca0fc55dc991f8
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Mon Sep 28 14:54:39 2015 +0200

    Added API versioning for ejabberdctl and rest commands

commit cd017b0e3aac431bc3ee807ceb7f8641e1523ef5
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Fri Sep 18 11:21:45 2015 +0200

    Better error handling of HTTP API commands.

commit ca5cb6acd8e4643f9d6c484d2277b0d7e88471e5
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Tue Sep 15 15:03:05 2015 +0200

    add commands to mod_admin_extra:
    - get_offline_count
    - get_presence
    - change_password

commit 7f583fa099e30ac2b0915669fd8f102ac565b833
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Tue Sep 15 15:02:16 2015 +0200

    Improve REST API error handling

commit 14753b1c02cdce434a786b7f80f6c09f0d210075
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Mon Sep 14 10:51:17 2015 +0200

    Change REST API return codes for integer type.
2016-03-31 14:53:31 +03:00
Badlop
3809b898aa Pass noauth when auth isn't provided, reverts a1129dc (processone/ejabberd-contrib#159) 2016-03-29 12:51:26 +02:00
Badlop
eece6e69cb Fix format_result so get_room_options command works again after aa5caa3 2016-02-17 20:43:35 +01:00
Paweł Chmielowski
47a67c7320 Allow to pass \n in argument to ejabberdctl 2016-02-12 23:38:39 +01:00
Badlop
f448ff608a Update copyright to 2016 (#901) 2016-01-13 12:29:14 +01:00
Paweł Chmielowski
67f93b0d60 Don't keep 10 sec timeout that i used for testing... 2015-12-08 11:28:03 +01:00
Paweł Chmielowski
7a69dab596 Add ability to disable timeout for ejabberdctl command 2015-12-08 11:25:26 +01:00
Christophe Romain
b4ae1b63bc Allow longer command execution time 2015-11-20 10:39:32 +01:00
Christophe Romain
6aeb9dcb38 cosmetic cleanup 2015-10-07 14:18:38 +02:00
Paweł Chmielowski
24fa95fd60 Fix problem with --auth in ejabberd_ctl:process2/2 2015-10-01 21:09:03 +02:00
Christophe Romain
a1129dc96b Add OAuth support (thanks to Aleksey) 2015-09-25 15:49:07 +02:00
Evgeniy Khramtsov
fb6267f38e Add config validation at startup 2015-06-01 15:38:27 +03:00
Badlop
084d0c4efe New command get_room_options (#567) 2015-05-15 17:47:10 +02:00
Badlop
2c4647a980 Fix binaries when ejabberd_ctl passes auth details 2015-01-15 20:00:06 +01:00
Badlop
5a35405cd5 Update copyright dates to 2015 (EJAB-1733) 2015-01-08 17:34:43 +01:00
Holger Weiss
d09c268b20 Let ejabberdctl accept binary string arguments
Don't print the following message if an ejabberd command expects binary
string arguments: "This command cannot be executed using ejabberdctl.
Try ejabberd_xmlrpc."
2014-04-29 01:11:08 +02:00
badlop
285c4c17cf Merge pull request #146 from jamielinux/master
Update FSF address
2014-04-11 13:35:46 +02:00
Badlop
a5a065290b Small change in ejabberd_ctl output format to support bash completion 2014-03-26 16:43:53 +01:00
Badlop
633d47f784 Update copyright dates to 2014 (EJAB-1679) 2014-03-13 12:30:57 +01:00
Jamie Nguyen
8538997d61 Update FSF address 2014-02-22 10:27:40 +00:00
Evgeniy Khramtsov
d03de1bb43 Fix some type specs and errors 2013-12-10 21:44:46 +10:00
Evgeniy Khramtsov
91a74e3e27 Change configuration file format to YAML 2013-08-21 22:17:59 +10:00
Evgeniy Khramtsov
597934637c Logger improvements.
lager:
	* It is now possible to change the loglevel.
	* Log rotation is now supported as well.
p1_logger:
	* When rotating a log file, add suffix ".0" to the renamed file.
	  This is needed in order to be consistent with lager
	  rotation mechanism.
2013-06-27 19:03:33 +10:00
Badlop
243d24015c Remove old obsolete R14 code 2013-06-14 16:18:22 +02:00
Badlop
4c445b37fd In frontends, if result is in binary then convert to string 2013-06-14 16:08:47 +02:00
Paweł Chmielowski
f6e39f64e2 Make ejabberd_ctl not die for ejabberd_commands with binary arguments 2013-06-14 16:08:02 +02:00
Evgeniy Khramtsov
4d8f770624 Switch to rebar build tool
Use dynamic Rebar configuration
Make iconv dependency optional
Disable transient_supervisors compile option
Add hipe compilation support
Only compile ibrowse and lhttpc when needed
Make it possible to generate an OTP application release
Add --enable-debug compile option
Add --enable-all compiler option
Add --enable-tools configure option
Add --with-erlang configure option.
Add --enable-erlang-version-check configure option.
Add lager support
Improve the test suite
2013-06-13 11:11:02 +02:00
Badlop
9deb294328 Accumulated patch to binarize and indent code 2013-03-14 10:33:02 +01:00
Alexey Shchepin
0ae400533c Update copyright dates 2013-01-24 16:25:13 +02:00
Badlop
4147081f0b Added clause so ejabberdctl number of arguments error report works with R15 2012-08-27 16:38:52 +02:00
Alexey Shchepin
b1e2538488 Update copyright dates 2012-02-23 17:52:34 +02:00
Badlop
48308042b6 Use the regexp frontend module (EJAB-921) 2011-12-08 12:40:04 +01:00
Evgeniy Khramtsov
ede8d57373 Fix dialyzer warnings 2011-09-17 10:48:52 +10:00
Christophe Romain
fd52f2cb7d update copyright up to 2011 2011-02-14 13:50:55 +01:00
Badlop
16fae4d117 Add support to ejabberd_ctl to handle anonymous command arguments 2010-10-15 21:53:03 +02:00
Badlop
7e90d6cf92 Fix print of command result that contains ~ (thanks to Tsukasa Hamano) 2010-07-03 00:42:54 +02:00
Badlop
1b1a0d7ed3 Support in ejabberdctl help command names with old - characters.
SVN Revision: 2924
2010-01-25 18:32:45 +00:00
Badlop
7b76fdcde7 Update year of ProcessOne copyright from 2009 to 2010 (EJAB-1159)
SVN Revision: 2891
2010-01-12 16:11:32 +00:00
Badlop
34d5d08501 Support for arguments in ejabberdctl that are empty strings.
SVN Revision: 2827
2009-12-28 11:45:46 +00:00
Badlop
d24449488c Print command's reply and newline only when there's something to print.
SVN Revision: 2806
2009-12-11 20:04:36 +00:00
Badlop
45b12ec886 Fix EDoc errors.
SVN Revision: 2494
2009-08-17 17:16:43 +00:00
Badlop
18af5f8675 Merge misplaced 2055 2058 and 2062 from ejabberd-2.0.4.
* src/ejabberd_app.erl: Better support for profiling.
* src/ejabberd.erl: Likewise
* src/ejabberd_ctl.erl: Likewise
* src/ejabberd_debug.erl: Likewise

SVN Revision: 2063
2009-05-07 22:46:51 +00:00
Badlop
d22c483781 * src/ejabberd_ctl.erl: New option to require auth in ejabberdctl
and restrict what commands and arguments can execute (EJAB-910)
* src/ejabberd_config.erl: Likewise

SVN Revision: 2024
2009-04-17 13:48:59 +00:00
Badlop
f09509502e * doc/guide.tex: Update copyright date 2008 to 2009 (EJAB-842)
* doc/guide.html: Likewise
* src/*/*.erl: Likewise
* src/*/*.erl: Remove unneeded blankspaces in license text

SVN Revision: 1804
2009-01-12 14:44:42 +00:00
Badlop
91a7110941 * src/*.erl: Fix EDoc comments
SVN Revision: 1771
2009-01-03 21:29:54 +00:00
Badlop
9d521c9dd0 * src/ejabberd_ctl.erl: If ejabberd didn't start correctly:
'ejabberdctl status' suggests to look in log files; any other
ejabberdctl command shows 'status'.

SVN Revision: 1668
2008-10-24 22:11:42 +00:00
Badlop
6bd76ebfda Replace mentions of mod_xmlrpc to ejabberd_xmlrpc
SVN Revision: 1645
2008-10-13 09:01:08 +00:00
Badlop
f2bd87b7cf * src/ejabberd_ctl.erl: Add frontend support for
commands (EJAB-694). Categorization and sorting of commands in
ejabberd_ctl help (EJAB-313). Lines in command line help of length
80, and text formatting (EJAB-473)

SVN Revision: 1636
2008-10-12 11:58:30 +00:00
Badlop
c3bda4aaee * doc/guide.tex: Update Process-one name to ProcessOne (EJAB-708)
* doc/guide.html: Likewise
* doc/api/overview.edoc: Likewise
* src/*/*.erl: Likewise
* src/*/*.hrl: Likewise
* src/*/*.c: Likewise
* src/odbc/*.sql: Likewise

SVN Revision: 1499
2008-07-31 11:18:49 +00:00
Jérôme Sautret
999c81e79c * src/ejabberd_ctl.erl: Call reopen_log_hook for each virtual host.
SVN Revision: 1461
2008-07-18 15:55:39 +00:00
Badlop
2ccf410a75 * src/ejabberd_ctl.erl: Web Admin and Ad-hoc admin: dump only
persistent tables (EJAB-678)

SVN Revision: 1387
2008-06-29 11:59:06 +00:00
Christophe Romain
b2bd9759c8 Rewrite io:format calls to loglevel macros (EJAB-555)
SVN Revision: 1239
2008-03-21 14:44:16 +00:00
Mickaël Rémond
4cf68c2f9f * src/ejabberd_ctl.erl: API improvement: Added reopen_log_hook (EJAB-565)
SVN Revision: 1234
2008-03-15 10:57:38 +00:00
Badlop
2d2fcc8210 * doc/guide.tex: Updated copyright dates to 2008
* src/*: Likewise

SVN Revision: 1153
2008-01-15 17:02:57 +00:00
Mickaël Rémond
56fe3579bb * Applied copyright update patch 1.
SVN Revision: 1110
2007-12-24 11:41:41 +00:00
Badlop
d1f902768c * src/ejabberd_ctl.erl: Added new command: mnesia (thanks to
Tsukasa Hamano)

SVN Revision: 1094
2007-12-21 21:50:22 +00:00
Badlop
d625fc80fc * src/acl.erl and other 64 files: Remove Erlang module attribute
'vsn' because it doesn't provide any worth feature, and it
difficults hot code update (EJAB-440)

SVN Revision: 1044
2007-12-06 22:12:27 +00:00
Badlop
399604e55d * src/ejabberdctl.template: Removed bashisms (EJAB-399). Set environment variables instead of passing parameters when calling erl (EJAB-421).
* src/ejabberd_ctl.erl: Improvements in the help messages (EJAB-399).

* doc/guide.tex: Improvements in sections ejabberdctl, and Install from Source (EJAB-399).

SVN Revision: 978
2007-11-26 07:59:35 +00:00
Mickaël Rémond
dcaeb764f5 * src/ejabberd_ctl.erl: Bugfix: Now display all register commands for a
vhost and not only one (Thanks to Badlop) (EJAB-162).
* src/ejabberd.cfg.example: Fixed typo.

SVN Revision: 694
2006-12-15 21:26:47 +00:00
Mickaël Rémond
177b367cbe * src/ejabberd_ctl.erl: Added a way to delete the older message
from the offline message table. This function is only available if
offline message queue is stored in Mnesia internal database. The
function delete_old_messages is not available in mod_offline_odbc.

SVN Revision: 565
2006-05-07 21:26:06 +00:00
Mickaël Rémond
640e1579f5 * src/ejabberd_ctl.erl: Now prints a user-friendly when trying
to restore a backup from a non-existent file.

SVN Revision: 564
2006-05-07 17:31:12 +00:00
Mickaël Rémond
ba55665381 * src/mod_configure.erl: Unknown tables or tables from now
unused modules are ignored during restore. The restore can now be
performed in such case (EJAB-80).
* src/web/ejabberd_web_admin.er: Likewise.
* src/ejabberd_admin.erl: Likewise. Code refactoring. Common Mnesia
database restore function.

SVN Revision: 562
2006-05-07 16:52:21 +00:00
Mickaël Rémond
c57ca8a483 * src/ejabberd_ctl.erl: Unknown tables or tables from now unused
modules are ignored during restore. The restore can now be performed in
such case.

SVN Revision: 561
2006-05-01 09:55:03 +00:00
Mickaël Rémond
bd4c18516c * src/ejabberd_ctl.erl: The status now only returns "started" if
ejabberd is started and ready to accept requests.

SVN Revision: 554
2006-04-26 22:28:05 +00:00
Alexey Shchepin
80181dc618 * src/ejabberd_ctl.erl: Added API for virtual host specific
commands, removed registered-users command
* src/ejabberd_auth.erl: Added processing of registered-users
command
* src/ejabberd_auth_internal.erl: Likewise
* src/ejabberd_auth_ldap.erl: Likewise
* src/ejabberd_auth_odbc.erl: Likewise
* src/ejabberd_app.erl: Added inititalization of ejabberd_ctl
* src/ejabberd_sm.erl: Minor update

SVN Revision: 510
2006-02-20 04:07:42 +00:00
Alexey Shchepin
0234b83be4 * src/mod_service_log.erl: Bugfix (thanks to Badlop)
* src/jd2ejd.erl: Use mod_vcard_odbc if it is loaded (thanks to
Tomasz Sterna)

* src/ejabberd_sm.erl: Added a few ejabberdctl commands

* src/ejabberd_ctl.erl: New interface for command registration

SVN Revision: 507
2006-02-15 04:15:54 +00:00
Alexey Shchepin
3eb1b59e64 * src/ejabberd_ctl.erl: Partially rewritten
SVN Revision: 505
2006-02-13 04:02:59 +00:00
Alexey Shchepin
dbb248247b * src/mod_last_odbc.erl: Added store_last_info/4 function (thanks
to Sergei Golovan)
* src/mod_last.erl: Likewise

* src/jd2ejd.erl: Support for exporting iq:last information,
better error handling (thanks to Sergei Golovan)

* src/ejabberd_ctl.erl: Added "import-file" and "import-dir"
commands (thanks to Sergei Golovan)

SVN Revision: 358
2005-05-23 19:47:57 +00:00
Alexey Shchepin
b695656631 * src/ejabberd_ctl.erl: Better spelling, now prints full file
paths, fixed checking of mnesia:install_fallback result, now
"dump" command dumps only persistent tables

SVN Revision: 331
2005-04-26 23:11:16 +00:00
Alexey Shchepin
530c036984 Applied VH patch
SVN Revision: 310
2005-04-17 22:59:44 +00:00
Alexey Shchepin
e46b28f27f Cleanup
SVN Revision: 309
2005-04-17 21:39:41 +00:00
tmallard
374446f847 Merged the Process One contributions ( Virtual Hosting )
SVN Revision: 307
2005-04-17 18:08:34 +00:00
Alexey Shchepin
6d74a69de5 * src/ejabberd_ctl.erl: Bugfix
SVN Revision: 300
2005-03-30 21:44:59 +00:00
Alexey Shchepin
e0ede61e0f * tools/ejabberdctl: Added call to "exec" (thanks to Sergei
Golovan)

* src/msgs/ru.msg: Updated (thanks to Sergei Golovan)

* src/mod_vcard.erl: Support for searching of prefix substring and
limiting of result items (thanks to Sergei Golovan)

* src/mod_offline.erl: Support for message expiration (JEP-0023)
(thanks to Sergei Golovan)
* src/jlib.hrl: Added NS_EXPIRE macros (thanks to Sergei Golovan)

* src/ejabberd_logger_h.erl: Added reopen_log/0 (thanks to Sergei
Golovan)

* src/ejabberd_ctl.erl: Added return codes, updated "reopen-log"
command, added "delete-expired-messages" and "status" commands
(thanks to Sergei Golovan)

* doc/guide.tex: Updated (thanks to Sergei Golovan)

SVN Revision: 264
2004-09-10 20:57:00 +00:00
Alexey Shchepin
f7275fb796 * src/ejabberd_ctl.erl: Added command for listing all registered
users

* src/ejabberd_ctl.erl: Bugfix, support for text-load and restore
(thanks to Leif Johansson)

SVN Revision: 229
2004-05-05 20:34:54 +00:00
Alexey Shchepin
976e185a4a * src/ejabberd_ctl.erl: Added command for log reopening
SVN Revision: 201
2004-01-27 19:14:49 +00:00
Alexey Shchepin
273886701b * src/ejabberd_ctl.erl: Added commands for backup processing
* src/ejabberd_c2s.erl: Added processing of xml:lang according to
latest XMPP-IM draft

* src/xml.erl: Added replace_tag_attr/3 function

* src/mod_roster.erl: Added auto-reply on incoming subscription
request according to latest XMPP-IM draft

* src/mod_offline.erl: Added pop_offline_messages/1 function
* src/ejabberd_c2s.erl: Updated sending of offline messages

SVN Revision: 200
2004-01-18 20:42:09 +00:00
Alexey Shchepin
c7d15b12df * src/ejabberd_c2s.erl: Fixed bind namespace
* src/ejabberd_ctl.erl: New module for ejabberd administration
* tools/ejabberdctl: Shell script for ejabberd administration

* src/mod_vcard.erl: Copyright update

* src/ejabberd_service.erl: Now possible to specify access rules
for service
* src/ejabberd.cfg.example: Updated

SVN Revision: 198
2004-01-11 20:42:57 +00:00