anchor.diff:  role_to_string({Role, [BucketName]}) ->
       lists:flatten(io_lib:format("~p[~s]", [Role, BucketName])).
   
  -parse_roles_test() ->
  -    Res = parse_roles("admin, bucket_admin[test.test], bucket_admin[*], no_such_atom, bucket_admin[default"),
  -    ?assertMatch([admin,
  -                  {bucket_admin, ["test.test"]},
  -                  {bucket_admin, [any]},
  -                  {error, "no_such_atom"},
  -                  {error, "bucket_admin[default"}], Res).
  -
   reply_bad_roles(Req, BadRoles) ->
       Str = string:join(BadRoles, ","),
       menelaus_util:reply_json(
  
positive.code:                         [iolist_to_binary(permission_to_iolist(Permission)) | Acc]
                  end, [], Permissions).
  
  format_permissions_test() ->
      Permissions = [{[{bucket, any}, views], write},
                     {[{bucket, "default"}], all},
  
negative.code:                       {Trimmed, parse_permission(Trimmed)}
                end, RawPermissions).
  
  handle_check_permissions_post(Req) ->
      Body = Req:recv_body(),
      case Body of
  