AKZA#36947 probeer auto-melding indien geen leesrechten op het object
svn path=/Website/trunk/; revision=30113
This commit is contained in:
@@ -527,7 +527,10 @@ ins = {checkAutLevel:
|
||||
var iresult = ins.func_enabled_scope(ioRs("ins_discipline_key").Value,
|
||||
ioRs("ins_alg_ruimte_type").Value,
|
||||
ioRs("ins_alg_ruimte_key").Value);
|
||||
user.auth_required_or_abort(iresult);
|
||||
if (params && !params.isOptional)
|
||||
user.auth_required_or_abort(iresult);
|
||||
else
|
||||
if (!iresult) return null;
|
||||
|
||||
if (params && params.srtcont_key > 0)
|
||||
{
|
||||
|
||||
@@ -25,22 +25,17 @@ var ins_key = getQParamInt("ins_key");
|
||||
var qrc = getQParamInt("qrc", 0) != 0;
|
||||
|
||||
//AUTH: mag ik deze zien?
|
||||
var this_ins = ins.func_enabled_deel(ins_key);
|
||||
if (this_ins.isSleCil)
|
||||
var autfunction = "WEB_SLEBOF";
|
||||
else
|
||||
var autfunction = getQParam("pautfunction", ["WEB_INSMAN", "WEB_INSUSE"]);
|
||||
var this_ins = ins.func_enabled_deel(ins_key, {"isOptional": true});
|
||||
|
||||
var authparams = user.checkAutorisation(autfunction, true); // check authorisation
|
||||
// als ik deze details niet mag zien, spring ik door naar het doen van een melding
|
||||
if (!authparams || authparams.PRSreadlevel == 9 || authparams.ALGreadlevel == 9) {
|
||||
if (!this_ins) { // ik mag helemaal niets
|
||||
if (user.checkAutorisation( "WEB_MLDUSE", true)) {
|
||||
var theURL = "./melding.asp?mld_key=-1&ins_key=" + ins_key;
|
||||
Response.Redirect(theURL);
|
||||
}
|
||||
else
|
||||
authparams = user.checkAutorisation(autfunction); // now require authorisation (will be read, no write, or none)
|
||||
|
||||
else {
|
||||
ins.func_enabled_deel(ins_key, {"isOptional": false}); // effectief hier de not authorized
|
||||
}
|
||||
// Could be enhanced to autojump to inspection or reservation under certain conditions
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user