Commit 93b3e431 authored by Bertrand  NÉRON's avatar Bertrand NÉRON

fix authentification

check if _admin nstead of admin is in list of admins
parent 43867ced
function(newDoc, oldDoc, userCtx, secObj) {
if(!userCtx || userCtx.roles.indexOf("admin") == -1 ) {
if(!userCtx || userCtx.roles.indexOf("_admin") == -1 ) {
throw({forbidden: "Bad user userCtx.name="+userCtx.name+" , userCtx.roles="+userCtx.roles});
} else {
if (!newDoc.code) throw({forbidden : "System must have a code"});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment