Demo:fix
This commit is contained in:
@@ -14,11 +14,11 @@ const clientVisibleSession = { user: true, name: true, type: true, mail: true, r
|
||||
|
||||
// Return user role, query from found.mail
|
||||
function getUserRole(found) {
|
||||
var roles = "user";
|
||||
var roles = "user:true";
|
||||
var mail = found.mail;
|
||||
if (!/\d/.test(mail)) {
|
||||
// Mail contains no number
|
||||
roles += ',"author"';
|
||||
roles += ',"author:true"';
|
||||
}
|
||||
return ('{'+roles+'}');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user