AKZA#36947 probeer auto-melding indien geen leesrechten op het object
svn path=/Website/trunk/; revision=30110
This commit is contained in:
@@ -4,9 +4,9 @@
|
||||
$Id$
|
||||
|
||||
File: ins_deel.asp
|
||||
Description: List of objects (Mobile version)
|
||||
Description: Details of an object (Mobile version) and access to actions on that object
|
||||
If not authorised for this object we automatically forward to a "melding" on this object.
|
||||
Parameters: ins_key (bv via QRC)
|
||||
Note: CONCEPTUAL
|
||||
|
||||
|
||||
*/ %>
|
||||
@@ -24,6 +24,26 @@
|
||||
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 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 (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)
|
||||
|
||||
// Could be enhanced to autojump to inspection or reservation under certain conditions
|
||||
};
|
||||
|
||||
var isResDeel = false;
|
||||
var perslid_key_beh = -1;
|
||||
var binding_text = 'unknown';
|
||||
@@ -38,7 +58,7 @@ var sql = " SELECT id.ins_deel_omschrijving"
|
||||
+ " , id.ins_deel_parent_key"
|
||||
+ " , id.ins_alg_ruimte_type"
|
||||
+ " , id.ins_alg_ruimte_key"
|
||||
+ " , id.prs_perslid_key_beh"
|
||||
+ " , id.prs_perslid_key_beh"
|
||||
+ " FROM ins_deel id"
|
||||
+ " , ins_srtdeel sd"
|
||||
+ " WHERE sd.ins_srtdeel_key = id.ins_srtdeel_key"
|
||||
@@ -57,7 +77,7 @@ if (!oRs.eof)
|
||||
var subject = ins_srtdeel_omschrijving+ " " +ins_deel_omschrijving;
|
||||
perslid_key_beh = oRs("prs_perslid_key_beh").Value || -1;
|
||||
var plaats_afdeling = ins.getBindingItemString(ruimte_type, ruimte_key, ins_parent_key);
|
||||
|
||||
|
||||
switch (ruimte_type)
|
||||
{
|
||||
case 'R':
|
||||
@@ -78,7 +98,7 @@ if (!oRs.eof)
|
||||
case 'C':
|
||||
binding_text = L("lcl_obj_bind_c");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Haal nog wat gegevens over de parent op als het een onderdeel is.
|
||||
var parent = "";
|
||||
@@ -118,15 +138,15 @@ oRs.Close();
|
||||
}
|
||||
// zit al in de titel: ROFIELD("fld", L("lcl_obj_identification"), ins_deel_omschrijving);
|
||||
ROFIELD("fld", L("lcl_ins_opmerking"), ins_deel_opmerking, {suppressEmpty: true});
|
||||
|
||||
ROFIELD("fld", binding_text, plaats_afdeling);
|
||||
|
||||
|
||||
ROFIELD("fld", binding_text, plaats_afdeling);
|
||||
|
||||
if (perslid_key_beh > -1)
|
||||
{
|
||||
var prs_melder = new Perslid(perslid_key_beh);
|
||||
ROFIELD("fld", L("lcl_ins_manager"), prs_melder.naam());
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Plus flexkenmerken
|
||||
generateFlexKenmerkBlock({
|
||||
|
||||
@@ -166,6 +166,7 @@ if (srtdisc_key > 0)
|
||||
, asideColumn: S("mld_selector_mode")==1?"ins_discipline_omschrijving":null
|
||||
, ID: "factable"
|
||||
, showAll: true
|
||||
, noSearch: true /* visually disturbing */
|
||||
, emptySetString: L("lcl_empty")
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user