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:
parent
ead83b008c
commit
36ac1cd6c7
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user