Recognize "- who:" not only "who:" syntax in api_permissions

This commit is contained in:
Paweł Chmielowski 2016-12-08 12:01:24 +01:00
parent 8a7ea85a7e
commit a3b12fd745
1 changed files with 2 additions and 1 deletions

View File

@ -331,7 +331,8 @@ command_matches_patterns(C, [_ | Tail]) ->
parse_api_permissions(Data) when is_list(Data) ->
throw({replace_with, [parse_api_permission(Name, Args) || {Name, Args} <- Data]}).
parse_api_permission(Name, Args) ->
parse_api_permission(Name, Args0) ->
Args = lists:flatten(Args0),
{From, Who, What} = case key_split(Args, [{from, []}, {who, none}, {what, []}]) of
{error, Msg} ->
report_error(<<"~s inside api_permission '~s' section">>, [Msg, Name]);