Merge 2015.3 patches
svn path=/Website/trunk/; revision=27997
This commit is contained in:
@@ -59,7 +59,33 @@ api2_rest = {
|
||||
oRs.Close();
|
||||
}
|
||||
|
||||
// Impersonate?
|
||||
// APP? Die kan meta-rechten hebben (bijvoorbeeld auth-token opvragen van gebruiker)
|
||||
var APPKEY;
|
||||
if (S("fac_api_key_in_url"))
|
||||
APPKEY = getQParam("HTTP_X_FACILITOR_APP_KEY", "");
|
||||
if (!APPKEY && Request.ServerVariables("HTTP_X_FACILITOR_APP_KEY").Count)
|
||||
APPKEY = String(Request.ServerVariables("HTTP_X_FACILITOR_APP_KEY")); // Meegegeven als X-FACILITOR-APP-Key
|
||||
if (APPKEY)
|
||||
{
|
||||
var sql = "SELECT prs_perslid_key, prs_perslid_naam"
|
||||
+ " FROM prs_perslid"
|
||||
+ " WHERE prs_perslid_verwijder IS NULL"
|
||||
+ " AND prs_perslid_apikey = " + safe.quoted_sql(APPKEY);
|
||||
var oRs = Oracle.Execute(sql);
|
||||
if (oRs.Eof)
|
||||
{
|
||||
__DoLog("Unauthorized app");
|
||||
Response.Status = "401 Unauthorized";
|
||||
Response.End;
|
||||
};
|
||||
__Log("APP User is: " + oRs("prs_perslid_naam").Value);
|
||||
/* global */ app_user_key = oRs("prs_perslid_key").Value;
|
||||
/* global */ app_user = new Perslid(app_user_key);
|
||||
oRs.Close()
|
||||
}
|
||||
|
||||
|
||||
// Impersonate? (anno jan-2016 in de praktijk nergens gebruikt, kan mogelijk vervallen)
|
||||
var IMPERS;
|
||||
if (S("fac_api_key_in_url"))
|
||||
IMPERS = getQParam("SWITCHUSER", "");
|
||||
|
||||
@@ -53,7 +53,7 @@ model_persons =
|
||||
//var urole = "fe"; // TODO: Moet echt niet ter zake doen
|
||||
//var autfunction = urole == "fe"? "WEB_ALGUSE" : "WEB_ALGMAN";
|
||||
//params.authparams = user.checkAutorisation(autfunction, null, null, true); // pessimistisch
|
||||
//if (params.filter.id == user_key)
|
||||
if (app_user_key > 0) // Alleen App's mogen dit opvragen. TODO: Ook echt authorisatie controleren?
|
||||
{
|
||||
if (user.prs_perslid_apikey() && user.oslogin())
|
||||
{
|
||||
|
||||
@@ -484,7 +484,7 @@ function fin_list (params)
|
||||
// Als er geen prefix aanwezig is, dan is het een bestelling of toch een meldingopdracht.
|
||||
if (firstIsDigit)
|
||||
{
|
||||
subsql[ii++] = "(o.mld_melding_key = " + ordbase
|
||||
subsql[ii++] = "(o.mld_melding_key = " + parseInt(ordbase,10)
|
||||
+ (volgnr
|
||||
? " AND o.mld_opdr_bedrijfopdr_volgnr = " + volgnr
|
||||
: "")
|
||||
@@ -510,8 +510,8 @@ function fin_list (params)
|
||||
}
|
||||
|
||||
// Als prefix geen waarde heeft (null) dan is er geen ins_srtdiscipline gevonden en is het geen melding.
|
||||
if (prefix)
|
||||
subsql[ii++] = "(o.mld_melding_key = " + ordbase + " AND UPPER(sd.ins_srtdiscipline_prefix) = " + safe.quoted_sql_wild(prefix)
|
||||
if (prefix && parseInt(ordbase,10))
|
||||
subsql[ii++] = "(o.mld_melding_key = " + parseInt(ordbase,10) + " AND UPPER(sd.ins_srtdiscipline_prefix) = " + safe.quoted_sql_wild(prefix)
|
||||
+ (volgnr
|
||||
? " AND o.mld_opdr_bedrijfopdr_volgnr = " + volgnr
|
||||
: "")
|
||||
|
||||
@@ -73,7 +73,7 @@ if (srtcontrole_key < 0)
|
||||
+ " OR isc.ins_srtcontrole_niveau = 'D'"
|
||||
+ " AND isc.ins_srtinstallatie_key = id.ins_discipline_key)"
|
||||
+ " AND id.ins_deel_key = " + ins_key
|
||||
+ (today != -1 ? " AND TRUNC(FAC.nextcyclusdate (id.ins_deel_key, isc.ins_srtcontrole_key, 1)) <= TRUNC(sysdate) " : "")
|
||||
+ (today != -1 ? " AND TRUNC(FAC.nextcyclusdatedeel (id.ins_deel_key, isc.ins_srtcontrole_key, 1)) <= TRUNC(sysdate) " : "")
|
||||
+ " GROUP BY id.ins_deel_omschrijving";
|
||||
var oRs = Oracle.Execute(sql);
|
||||
if (oRs.Eof) // er is niets over
|
||||
@@ -108,8 +108,8 @@ if (srtcontrole_key < 0 || defaultmode_key > 0)
|
||||
<% FCLTMHeader.Generate({}); %>
|
||||
<style>
|
||||
.prefixcol { height: 40px;
|
||||
background-color: #00ff00;
|
||||
padding: 10px;
|
||||
background-color: #66C2AF;
|
||||
padding: 7px;
|
||||
}
|
||||
.ui-listview > .ui-li-has-thumb > .ui-btn,
|
||||
.ui-listview > .ui-li-static.ui-li-has-thumb {
|
||||
@@ -157,11 +157,11 @@ if (srtcontrole_key < 0 || defaultmode_key > 0)
|
||||
+ " ON i.ins_deel_key = xcp.ins_deel_key"
|
||||
+ " AND i.ins_srtcontrole_key = xcp.ins_srtcontrole_key"
|
||||
+ " WHERE COALESCE (ins_srtcontroledl_xcp_eenheid, ins_srtcontrole_eenheid) <> 0"
|
||||
+ (today != -1 ? " AND TRUNC(FAC.nextcyclusdate (i.ins_deel_key, i.ins_srtcontrole_key, 1)) <= TRUNC(sysdate) " : "");
|
||||
+ (today != -1 ? " AND TRUNC(FAC.nextcyclusdatedeel (i.ins_deel_key, i.ins_srtcontrole_key, 1)) <= TRUNC(sysdate) " : "");
|
||||
|
||||
function fnPrefix(oRs, params)
|
||||
{
|
||||
return "<img src='../Pictures/accept.png' onclick='default_inspect({0});return false;' class='prefixcol'>".format(oRs.Fields("ins_srtcontrole_key").Value)
|
||||
return "<img src='../Pictures/check.png' onclick='default_inspect({0});return false;' class='prefixcol'>".format(oRs.Fields("ins_srtcontrole_key").Value)
|
||||
}
|
||||
|
||||
var rst = new ResultsetTable({sql: sql,
|
||||
|
||||
BIN
APPL/Pictures/check.png
Normal file
BIN
APPL/Pictures/check.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 724 B |
@@ -222,6 +222,10 @@ if (typeof Session("ASPFIXATION") != "undefined")
|
||||
|
||||
// Zijn we bekend? Zo niet dan naar login.asp om dat uit te zoeken
|
||||
var user_key = Session("user_key") || -1;
|
||||
var user; // wordt bij geldige user gevuld met new Perslid
|
||||
// Hetzelfde voor API2 app-user
|
||||
var app_user_key = -1;
|
||||
var app_user;
|
||||
|
||||
if (user_key < 0 && typeof LOGIN_try == "undefined")
|
||||
{
|
||||
|
||||
@@ -818,7 +818,8 @@ safe = {
|
||||
// ook een 'hoge' unicode
|
||||
tekst = tekst.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F]+/g, "?");
|
||||
tekst = tekst.substr(0, maxlen);
|
||||
return "'" + tekst.replace(/\'/g,"''") + "'"; // " syntax highlight correctie
|
||||
// FSN#35288: '{' naar CHR(123) voorkomt Unspecified Error
|
||||
return "'" + tekst.replace(/\'/g,"''").replace(/\{/g,"'||CHR(123)||'") + "'"; // " syntax highlight correctie
|
||||
},
|
||||
qL: function (p_lcl, params)
|
||||
{
|
||||
|
||||
@@ -246,8 +246,8 @@ input[readonly], select[readonly], textarea[readonly] {
|
||||
padding: 0;
|
||||
}
|
||||
input[readonly], select[readonly], textarea[readonly], td span.readonly, td div.readonly {
|
||||
filter: alpha(opacity=70);
|
||||
opacity: 0.7;
|
||||
filter: alpha(opacity=80);
|
||||
opacity: 0.8;
|
||||
}
|
||||
td span.readonly {
|
||||
display: inline-block; /* zodat span ook width respecteert */
|
||||
@@ -822,8 +822,8 @@ div.wbackground {
|
||||
.newstextFresh {font-weight: normal; color: ==textcolor==;}
|
||||
.newstext {
|
||||
color: ==textcolor==;
|
||||
filter: alpha(opacity=70);
|
||||
opacity: 0.7;
|
||||
filter: alpha(opacity=80);
|
||||
opacity: 0.8;
|
||||
}
|
||||
td.markread {
|
||||
width: 24px;
|
||||
@@ -1476,8 +1476,8 @@ span.expired2 {
|
||||
.today td {
|
||||
}
|
||||
.future td {
|
||||
filter: alpha(opacity=70);
|
||||
opacity: 0.7;
|
||||
filter: alpha(opacity=90);
|
||||
opacity: 0.9;
|
||||
}
|
||||
.isready td {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user