Demo: fix

This commit is contained in:
Erik Römmelt 2019-07-24 18:50:30 +02:00
parent b891d8f516
commit 1165918cd6
2 changed files with 2 additions and 2 deletions

@ -1,6 +1,6 @@
db.users.insert([
// User: author, Pwd: author
{"_id":"author","name":"Author","type":"PF@EFI;","roles":{"user":true,"author":true},"hash":"sha256","salt":"SIzKNsNKsCRVr8a9U90q6A==","pwd":"HZly68TSAKHioz6Kz0QCbXVTHpT6hMmabUbFYVlCMeE=","abos":[],"bookmarks":[],},
{"_id":"author","name":"Author","type":"PF@EFI;","roles":{"user":true,"author":true},"hash":"sha256","salt":"SIzKNsNKsCRVr8a9U90q6A==","pwd":"HZly68TSAKHioz6Kz0QCbXVTHpT6hMmabUbFYVlCMeE=","abos":[],"bookmarks":[]},
// User: admin, Pwd: SwenMho
// {"_id":"admin","name":"Test Admin","type":"MA@AMP;","roles":'{"user":true,"author":true,"admin":true}',"hash":"sha256","salt":"z3PNXGmQaWvaT7m2ZlT+0w==","pwd":"nfUfNv032J745xj3Hzya3Mkk43Dz/H0BmNTZhtx8UM0=","abos":["veniam","ipsum"],"bookmarks":[],},
])

@ -18,7 +18,7 @@ function getUserRole(found) {
var mail = found.mail;
if (!/\d/.test(mail)) {
// Mail contains no number
roles += ",author";
roles += ',"author"';
}
return ('{'+roles+'}');
}