Commits

Paul Jones  committed 05d281c

User creating new vhosts should get full privileges on them

  • Participants
  • Parent commits d36ac81
  • Branches bug22237

Comments (0)

Files changed (1)

File src/bql_applicator.erl

 apply_command({create_vhost, Name}, #state {user = Username, node = Node}) ->
     ensure_wildcard_access(Username, ?MASTER_VHOST, configure),
     rpc_call(Node, rabbit_access_control, add_vhost, [list_to_binary(Name)]),
+    apply_privilege_list(Username, list_to_binary(Name), expand_privilege_list(all), <<".*">>),
     ok;
 apply_command({drop_vhost, Name}, #state {user = Username, node = Node}) ->
     ensure_wildcard_access(Username, ?MASTER_VHOST, configure),