init
Signed-off-by: Jannis <jannis@edu.tbz.ch>
This commit is contained in:
commit
3cc4ae5699
28 changed files with 1109 additions and 0 deletions
22
user_creation.js
Normal file
22
user_creation.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
use gaming
|
||||
|
||||
db.createUser({
|
||||
user: "readOnlyUser",
|
||||
pwd: "readOnly123",
|
||||
roles: [
|
||||
{ role: "read", db: "gaming" }
|
||||
]
|
||||
})
|
||||
|
||||
use admin
|
||||
|
||||
db.createUser({
|
||||
user: "readWriteUser",
|
||||
pwd: "readWrite123",
|
||||
roles: [
|
||||
{ role: "readWrite", db: "gaming" }
|
||||
]
|
||||
})
|
||||
|
||||
use admin
|
||||
db.system.users.find({}, {user: 1, db: 1, roles: 1})
|
Loading…
Add table
Add a link
Reference in a new issue