Skip to content

Commit 0da42a6

Browse files
committed
fix seed user
1 parent 976d168 commit 0da42a6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

addons/init-mongo.js

+7
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ function seed(dbName, user, password) {
3030
name: 'Admin',
3131
3232
password: '$2a$10$psWmSrmtyZYvtIt/FuJL1OLqsK3iR1fZz5.wUYFuSNkkt.EOX9mLa', // hash of password: changeit
33+
roles: db.roles
34+
.find({})
35+
.toArray()
36+
.map((role) => role._id),
37+
status: true,
38+
createdAt: new Date(),
39+
updatedAt: new Date(),
3340
});
3441
}
3542

0 commit comments

Comments
 (0)