-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Admin extra interface #575
Conversation
@ludwikbukowski sth's wrong with |
(_M, Res) -> | ||
Res | ||
end, {error, not_allowed}, auth_modules(LServer)). | ||
case is_user_exists(LUser, LServer) of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this check should be moved to the main function which is set_password
unless do_set_password
is used directly from other places.
ec021bd
to
4ebab33
Compare
@@ -113,21 +113,44 @@ commands() -> | |||
%%% | |||
|
|||
get_vcard(User, Host, Name) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember to add specs for exported functions and also change specs when you modify functions
c27cc77
to
6d5cb9b
Compare
I see that most (if not all) commands you touched have now result type
Also I think we can remove the unnecessary empty lines in the help output above. |
3060355
to
0f76db2
Compare
0f76db2
to
ad0a10a
Compare
"Subj", "\"Are | ||
you there?\""], | ||
Config), | ||
Err1 =/=0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed this on Travis when testing stuff rebased on top of this PR:
ejabberdctl_SUITE.erl:750: Warning: use of operator '=/=' has no effect
ejabberdctl_SUITE.erl:751: Warning: use of operator '=/=' has no effect
Which makes sense, since these lines are not assertions! They evaluate to a boolean()
which is then discarded.
Please rewrite to:
true = Err1 =/= 0
or
?assertNotEqual(0, Err1)
or
?assert(Err1 =/= 0)
I tried to make admin interface more hospitable. It should do some checks on input and inform about result of command.
Improved following modules: