FSN#29493 discxprs3d is al heel lang obsolete
svn path=/Website/trunk/; revision=21456
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
Note:
|
||||
*/ %>
|
||||
|
||||
<!-- #include file="../Shared/disCxprs3d.inc" -->
|
||||
<!-- #include file="../Shared/json2.js" -->
|
||||
<!-- #include file="../Shared/resultset_table_v2.inc" -->
|
||||
<!-- #include file="../Shared/getkenmerksql.inc" -->
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
Note:
|
||||
*/ %>
|
||||
|
||||
<!-- #include file="../Shared/disCxprs3d.inc" -->
|
||||
<!-- #include file="../Shared/json2.js" -->
|
||||
<!-- #include file="../Shared/resultset_table_v2.inc" -->
|
||||
<!-- #include file="../Shared/getkenmerksql.inc" -->
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
Note:
|
||||
*/ %>
|
||||
|
||||
<!-- #include file="../Shared/disCxprs3d.inc" -->
|
||||
<!-- #include file="../Shared/json2.js" -->
|
||||
<!-- #include file="../Shared/resultset_table_v2.inc" -->
|
||||
<!-- #include file="../Shared/getkenmerksql.inc" -->
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
Note:
|
||||
*/ %>
|
||||
|
||||
<!-- #include file="../Shared/disCxprs3d.inc" -->
|
||||
<!-- #include file="../Shared/json2.js" -->
|
||||
<!-- #include file="../Shared/resultset_table_v2.inc" -->
|
||||
<!-- #include file="../Shared/getkenmerksql.inc" -->
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
Note:
|
||||
*/ %>
|
||||
|
||||
<!-- #include file="../Shared/discxprs3d.inc" -->
|
||||
<!-- #include file="../Shared/json2.js" -->
|
||||
<!-- #include file="../Shared/resultset_table_v2.inc" -->
|
||||
<!-- #include file="bes.inc" -->
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
Note:
|
||||
*/ %>
|
||||
|
||||
<!-- #include file="../Shared/disCxprs3d.inc" -->
|
||||
<!-- #include file="../Shared/json2.js" -->
|
||||
<!-- #include file="../Shared/resultset_table_v2.inc" -->
|
||||
<!-- #include file="ins.inc"-->
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
Note:
|
||||
*/ %>
|
||||
|
||||
<!-- #include file="../Shared/discxprs3d.inc" -->
|
||||
<!-- #include file="../Shared/json2.js" -->
|
||||
<!-- #include file="../Shared/kenmerk_common.inc" -->
|
||||
<!-- #include file="../Shared/resultset_table_v2.inc" -->
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
// it must be called at the end of the sql creation, i.e. sql must be complete (apart from order by)
|
||||
// Variabele pdisc is used (if present) to restrict the condition to only the disciplines in this (comma separated) list
|
||||
//
|
||||
// Is similar to discxprs3d.inc
|
||||
//
|
||||
function discxalg3d (
|
||||
psql,
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
<% /*
|
||||
$Revision$
|
||||
$Id$
|
||||
*/ %>
|
||||
|
||||
<%
|
||||
//
|
||||
// Include file (ASP) used for adding a 3D PRS (organization) authorization clause
|
||||
// to an SQL statement 'sql' that is being build
|
||||
// It requires some column names that represent the columns of discipline and organisation
|
||||
// in this SQL statement, and modifies the sql variable
|
||||
// Since it creates several UNIONs based upon the current sql statement,
|
||||
// it must be added at the end of the sql creation.
|
||||
// Variabele disc is used (if present) to restrict the condition to only the disciplines in this (comma separated) list
|
||||
//
|
||||
// Is similar to discxalg3d.inc
|
||||
//
|
||||
function discxprs3d (
|
||||
psql,
|
||||
psql_group_by,
|
||||
pdiscipline_column_3d,
|
||||
pbedrijf_column_3d,
|
||||
pafdeling_column_3d,
|
||||
pautfunction,
|
||||
pdisc) // "" for unknown
|
||||
{
|
||||
__Log('discipline_column_3d = '+pdiscipline_column_3d
|
||||
+'<br>bedrijf_column_3d = '+pbedrijf_column_3d
|
||||
+'<br>afdeling_column_3d = '+pafdeling_column_3d
|
||||
+'<br>autfunction = '+pautfunction
|
||||
+'<br>disc = '+pdisc);
|
||||
__Log('InputSQL: <small>' + psql + '</small>');
|
||||
__Log('GroupBySQL: <small>' + psql_group_by + '</small>');
|
||||
|
||||
// ==============================
|
||||
// === BUILD PRS_AUTORISATION ===
|
||||
// ==============================
|
||||
var oRsP = Oracle.Execute ("SELECT prs_bedrijf_key, prs_afdeling_key1, prs_afdeling_key2, "
|
||||
+ " prs_afdeling_key3, prs_afdeling_key4, prs_afdeling_key5 "
|
||||
+ " FROM prs_v_afdeling_boom b, prs_perslid p "
|
||||
+ " WHERE b.prs_afdeling_key = p.prs_afdeling_key "
|
||||
+ " AND p.prs_perslid_key = " + user_key)
|
||||
var bedr = oRsP("PRS_BEDRIJF_KEY").Value
|
||||
var afd1 = oRsP("PRS_AFDELING_KEY1").Value
|
||||
var afd2 = oRsP("PRS_AFDELING_KEY2").Value
|
||||
var afd3 = oRsP("PRS_AFDELING_KEY3").Value
|
||||
var afd4 = oRsP("PRS_AFDELING_KEY4").Value
|
||||
var afd5 = oRsP("PRS_AFDELING_KEY5").Value
|
||||
|
||||
// Iterate through all disciplines
|
||||
var sqlD = "SELECT i.ins_discipline_key, fac_gebruiker_prs_level_read"
|
||||
+ " FROM fac_v_webgebruiker wg, fac_functie f, ins_tab_discipline i"
|
||||
+ " WHERE wg.prs_perslid_key="+user_key
|
||||
+ " AND f.fac_functie_key=wg.fac_functie_key"
|
||||
+ " AND f.fac_functie_code="+ safe.quoted_sql(pautfunction)
|
||||
+ " AND wg.fac_gebruiker_prs_level_read<9"
|
||||
+ " AND wg.ins_discipline_key = i.ins_discipline_key"
|
||||
+ " AND i.ins_discipline_verwijder is NULL";
|
||||
if( pdisc != '') {
|
||||
sqlD += " AND ins_discipline_key IN (" + pdisc + ")";
|
||||
}
|
||||
sqlD += " ORDER BY 2,1"; // we need this
|
||||
|
||||
var oRsP = Oracle.Execute(sqlD)
|
||||
var fullSQL = "" // Build a UNION for each INS_DISCIPLINE
|
||||
while (!oRsP.eof)
|
||||
{
|
||||
var discsOfThisLevel = '';
|
||||
var thisLevel = oRsP(1).value;
|
||||
while ( !oRsP.eof && oRsP(1) == thisLevel ) {
|
||||
discsOfThisLevel += (discsOfThisLevel=='' ? oRsP(0) : ','+oRsP(0));
|
||||
oRsP.MoveNext()
|
||||
}
|
||||
fullSQL += (fullSQL==""?"":" UNION ")
|
||||
+ psql + " AND " + pdiscipline_column_3d + " IN ("+ discsOfThisLevel + ")";
|
||||
__Log(autfunction+' for disciplines ' + discsOfThisLevel + ' authorized at PRS level ' + thisLevel);
|
||||
|
||||
if (thisLevel==-1)
|
||||
{ // Done
|
||||
}
|
||||
else if (thisLevel== 0) { fullSQL += " AND "+ pbedrijf_column_3d + " = "+bedr }
|
||||
else if (thisLevel== 1) { fullSQL += " AND "+ pafdeling_column_3d + "1 = "+afd1 }
|
||||
else if (thisLevel== 2) { fullSQL += " AND "+ pafdeling_column_3d + "2 = "+afd2 }
|
||||
else if (thisLevel== 3) { fullSQL += " AND "+ pafdeling_column_3d + "3 = "+afd3 }
|
||||
else if (thisLevel== 4) { fullSQL += " AND "+ pafdeling_column_3d + "4 = "+afd4 }
|
||||
else if (thisLevel== 5) { fullSQL += " AND "+ pafdeling_column_3d + "5 = "+afd5 }
|
||||
else __Log("Waarschuwing: niveau nog niet ondersteund: " + thisLevel)
|
||||
fullSQL += psql_group_by;
|
||||
}
|
||||
oRsP.close();
|
||||
|
||||
// we return the extended version of psql, or, if NO discipline was read authorized we prohibit the selection
|
||||
return (fullSQL!="" ? fullSQL : psql+" AND 1=0");
|
||||
}
|
||||
%>
|
||||
Reference in New Issue
Block a user