Skip to content
Browse files

Merge pull request #524 from basho/jrd-issue-522

Stop doing implicit role manipulation
  • Loading branch information...
2 parents d2d844c + 486bd6c commit 006d38ef008542092dd1c1819e04687a393960c0 @Vagabond Vagabond committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/riak_core_security.erl
View
4 src/riak_core_security.erl
@@ -682,7 +682,7 @@ accumulate_grants([], Seen, Acc) ->
{Acc, Seen};
accumulate_grants([Role|Roles], Seen, Acc) ->
Options = riak_core_metadata:get({<<"security">>, <<"roles">>}, Role),
- NestedRoles = [R || R <- lookup("roles", Options),
+ NestedRoles = [R || R <- lookup("roles", Options, []),
not lists:member(R,Seen),
user_exists(R)],
{NewAcc, NewSeen} = accumulate_grants(NestedRoles, [Role|Seen], Acc),
@@ -760,7 +760,7 @@ validate_options(Options) ->
validate_role_option(Options) ->
case lookup("roles", Options) of
undefined ->
- {ok, stash("roles", {"roles", []}, Options)};
+ {ok, Options};
RoleStr ->
Roles= [list_to_binary(R) || R <-
string:tokens(RoleStr, ",")],

0 comments on commit 006d38e

Please sign in to comment.
Something went wrong with that request. Please try again.