Browse Source

Demo: fix

developer
Erik Römmelt 5 years ago
parent
commit
90c5362a57
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      server/authorization.js

+ 3
- 3
server/authorization.js View File

@@ -14,13 +14,13 @@ const clientVisibleSession = { user: true, name: true, type: true, mail: true, r

// Return user role, query from found.mail
function getUserRole(found) {
var roles = {user:true};
var roles = "user";
var mail = found.mail;
if (!/\d/.test(mail)) {
// Mail contains no number
roles.author = true;
roles += ",author";
}
return roles;
return ('{'+roles+'}');
}

// Fill in session object

Loading…
Cancel
Save