FSN#33833 Rapport mogelijkheden sturen via S("fac_usrrap_mode")
svn path=/Website/trunk/; revision=26462
This commit is contained in:
@@ -16,9 +16,9 @@
|
||||
<!-- #include file="./model_reportcolumns.inc" -->
|
||||
<%
|
||||
|
||||
function model_reportsx(usrrap_key, params)
|
||||
function model_reportsx(usrrap_key, rapparams)
|
||||
{
|
||||
params = params || {};
|
||||
rapparams = rapparams || {};
|
||||
this.table = "fac_usrrap";
|
||||
this.primary = "fac_usrrap_key";
|
||||
this.records_name = "reports";
|
||||
@@ -51,7 +51,7 @@ function model_reportsx(usrrap_key, params)
|
||||
filters: ["id", "name", "description"]
|
||||
};
|
||||
|
||||
this.includes = {"columns": { model: new model_reportcolumns(usrrap_key, { internal: params.internal }),
|
||||
this.includes = {"columns": { model: new model_reportcolumns(usrrap_key, { internal: rapparams.internal }),
|
||||
joinfield: "fac_usrrap_key",
|
||||
single_only: true
|
||||
}
|
||||
@@ -121,7 +121,7 @@ function model_reportsx(usrrap_key, params)
|
||||
+ " WHERE w.prs_perslid_key = " + user_key
|
||||
+ " ) OR fac_functie_key IS NULL)");
|
||||
}
|
||||
if (S("fac_usrrap_mode") != 1) // Als je niet mag clonen heb je niets aan UDR template rapporten
|
||||
if (S("fac_usrrap_mode") != 1 || rapparams.forview) // Als je niet mag clonen heb je niets aan UDR template rapporten
|
||||
{
|
||||
query.wheres.push("BITAND(COALESCE(fac_usrrap_functie, 0), 32) = 0");
|
||||
}
|
||||
@@ -206,7 +206,7 @@ function model_reportsx(usrrap_key, params)
|
||||
return { key: the_key, warning: "" };
|
||||
};
|
||||
|
||||
if (!params.internal)
|
||||
if (!rapparams.internal)
|
||||
{
|
||||
if (user.oslogin() == "_FACILITOR")
|
||||
settings.overrule_setting("fac_usrrap_mode", 1); // _FACILITOR mag alles
|
||||
@@ -236,8 +236,8 @@ function model_reportsx(usrrap_key, params)
|
||||
|
||||
if (usrrap_key > 0)
|
||||
{
|
||||
params.filter = { "id" : usrrap_key };
|
||||
this.data = this.REST_GET(params)[0];
|
||||
rapparams.filter = { "id" : usrrap_key };
|
||||
this.data = this.REST_GET(rapparams)[0];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user