]> granicus.if.org Git - ejabberd/commitdiff
Use proper default value for api_permissions
authorPaweł Chmielowski <pchmielowski@process-one.net>
Thu, 6 Oct 2016 08:47:17 +0000 (10:47 +0200)
committerPaweł Chmielowski <pchmielowski@process-one.net>
Thu, 6 Oct 2016 08:59:43 +0000 (10:59 +0200)
src/ejabberd_access_permissions.erl

index f37de9a135b8f549c48339953750481ac53fbc59..ac023b3f21878228c32edd07cfa7323a60476718 100644 (file)
@@ -228,15 +228,16 @@ code_change(_OldVsn, State, _Extra) ->
 %%% Internal functions
 %%%===================================================================
 
+-spec get_definitions(#state{}) -> {#state{}, any()}.
 get_definitions(#state{definitions = Defs, fragments_generators = Gens} = State) ->
     DefaultOptions = [{<<"console commands">>,
-                      [ejabberd_ctl],
-                      [{acl, all}],
-                      {all, none}},
+                      {[ejabberd_ctl],
+                       [{acl, all}],
+                       {all, none}}},
                      {<<"admin access">>,
-                      [],
-                      [{acl, admin}],
-                      {all, [start, stop]}}],
+                      {[],
+                       [{acl, admin}],
+                       {all, [start, stop]}}}],
     NDefs = case Defs of
                none ->
                    ApiPerms = ejabberd_config:get_option(api_permissions, fun(A) -> A end, DefaultOptions),