Skip to content

Commit

Permalink
fix: add readWrite role to mongo user roles
Browse files Browse the repository at this point in the history
  • Loading branch information
lukashass committed Feb 16, 2022
1 parent 487f05c commit ab55025
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adapters/mongo_adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (adapter mongoAdapter) CreateDatabaseUser(ctx context.Context, database str
bson.D{
{Key: "createUser", Value: username},
{Key: "pwd", Value: password},
{Key: "roles", Value: []bson.M{{"role": "dbAdmin", "db": database}}}}).Err()
{Key: "roles", Value: []bson.M{{"role": "dbAdmin", "db": database}, {"role": "readWrite", "db": database}}}}).Err()
}

func (adapter mongoAdapter) DeleteDatabaseUser(ctx context.Context, database string, username string) error {
Expand Down

0 comments on commit ab55025

Please sign in to comment.