24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-16 22:05:29 +02:00

Returns unauthorized error when we do not have correct credentials

This commit is contained in:
Mickael Remond 2016-03-30 14:49:19 +02:00
parent ead83b008c
commit 36ac1cd6c7
2 changed files with 3 additions and 2 deletions

View File

@ -183,7 +183,9 @@ check_permissions2(#request{ip={IP, _Port}}, Call, _Policy) ->
end;
_ ->
unauthorized_response()
end.
end;
check_permissions2(_Request, _Call, _Policy) ->
unauthorized_response().
oauth_check_token(Scope, Token) when is_atom(Scope) ->
oauth_check_token(atom_to_binary(Scope, utf8), Token);

View File

@ -43,7 +43,6 @@ defmodule ModHttpApiTest do
{200, _, _} = :mod_http_api.process(["open_cmd"], request)
end
@tag pending: true
test "Call to user, admin, restricted commands without authentication are rejected" do
request = request(method: :POST, data: "[]")
{401, _, _} = :mod_http_api.process(["user_cmd"], request)