Skip to content

Commit

Permalink
Merge pull request #28 from 4sh/SIMINVOICE-160
Browse files Browse the repository at this point in the history
SIMINVOICE-160: Create 4sh admin user
  • Loading branch information
chrhuang authored Feb 22, 2024
2 parents e66b173 + 2a1193d commit bfabfa7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions srv/db/v012__create_4sh_admin_user.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
var admin_user = {
name: "4sh_admin",
email: "[email protected]",
roles: ["seller"],
companyRef: "53c535a5c8d11a14c7269436",
companyRole: "DIRECTOR"
};

db.getCollection('users').insertOne(admin_user);

admin_user._id = db.getCollection('users').findOne({email: admin_user.email})._id;
db.getCollection('userCredentials').insertOne({
"_id": admin_user._id,
"passwordHash": "$2a$10$8EiasZHADtkNkF2C2yhfx./qY75KRa1iE.hABZxqQYQ4lbjUxUjxa"
});

0 comments on commit bfabfa7

Please sign in to comment.