FSN#35817 Autorisaties via API2/Scaffolding
svn path=/Website/trunk/; revision=28653
This commit is contained in:
@@ -115,7 +115,7 @@ function model_fac_functie (functie_key, params)
|
||||
var xparams = null;
|
||||
if (params.disc_key > 0)
|
||||
{
|
||||
xparams = { GET: { wheres: ["fac_functie_module = " + safe.quoted_sql(module),
|
||||
xparams = { GET: { wheres: ["fac_functie_module = " + safe.quoted_sql(this.module),
|
||||
"fac_functie_discipline = 1" // dan ook alleen de discipline gebonden functies
|
||||
] } }
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
File: model_fac_gebruikersgroep.inc
|
||||
|
||||
Description: Model voor fac_gebruikersgroep
|
||||
Welke gebruiker zit in welke groep?
|
||||
|
||||
Context:
|
||||
|
||||
@@ -60,7 +61,7 @@ function model_fac_gebruikersgroep()
|
||||
this.edit = {
|
||||
modal: true
|
||||
};
|
||||
this.autfunction = "WEB_PRSSYS";
|
||||
this.autfunction = "WEB_PRSMSU";
|
||||
this.record_title = L("fac_gebruikersgroep");
|
||||
this.records_title = L("fac_gebruikersgroep_m");
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ function model_fac_groeprechten (params)
|
||||
this.records_name = "fac_groeprecht";
|
||||
this.record_name = "fac_groeprechten";
|
||||
|
||||
this.autfunction = "WEB_PRSSYS";
|
||||
this.autfunction = "WEB_FACMSU";
|
||||
this.record_title = L("fac_groeprechten");
|
||||
this.records_title = L("fac_groeprechten_m");
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ function model_ins_tab_discipline(disc_key, params)
|
||||
}};
|
||||
}
|
||||
|
||||
this.autfunction = "WEB_PRSSYS";
|
||||
this.autfunction = "WEB_FACMSU";
|
||||
this.record_title = L("ins_discipline_key"); // TODO: De generieke termen
|
||||
this.records_title = L("res_v_res_catalogus_m");
|
||||
|
||||
@@ -141,6 +141,7 @@ function model_ins_tab_discipline(disc_key, params)
|
||||
if (params.functie_key > 0)
|
||||
{
|
||||
this.module = Oracle.Get("fac_functie_module", "fac_functie", params.functie_key);
|
||||
this.autfunction = ["WEB_FACMSU", "WEB_" + this.module + "MSU"];
|
||||
this.level = Oracle.Get("fac_functie_min_level", "fac_functie", params.functie_key);
|
||||
xparams = { GET: { wheres: ["ins_discipline_module = " + safe.quoted_sql(this.module)] } }
|
||||
}
|
||||
|
||||
@@ -229,9 +229,9 @@ function radioTD(name, LOV, val)
|
||||
{
|
||||
if (flevel & 2) // Schrijfrechten
|
||||
Response.Write("<tr><th>" + L("fac_gebruiker_lezen") + "</th><th>" + L("fac_gebruiker_schrijven") + "</th></tr>");
|
||||
radioTD("algread", jnLOV, algread);
|
||||
radioTD("prsread", jnLOV, algread);
|
||||
if (flevel & 2) // Schrijfrechten
|
||||
radioTD("algwrite", jnLOV, algwrite);
|
||||
radioTD("prswrite", jnLOV, algwrite);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -63,6 +63,11 @@ if (level & ( 4 | 8))
|
||||
algwrite = prswrite < 9?-1:9; // waarschijnlijk don't care
|
||||
}
|
||||
}
|
||||
else // Bij alleen Ja/Nee vullen we PRS in
|
||||
{
|
||||
algread = prsread;
|
||||
algwrite = prswrite;
|
||||
}
|
||||
if (algread == 9 || prsread == 9) // Geen rechten (over)
|
||||
{
|
||||
if (gr_key > 0)
|
||||
|
||||
@@ -85,9 +85,11 @@
|
||||
}
|
||||
if (!(model.level & (4 | 8)))
|
||||
{
|
||||
model.includes.authorization.model.fields["prs_level_read"].label = L("fac_gebruiker_lezen");
|
||||
model.includes.authorization.model.fields["prs_level_write"].label = L("fac_gebruiker_schrijven");
|
||||
scf_params.list.columns.push("authorization.prs_level_read");
|
||||
if (model.level & 2) // Schrijfrechten
|
||||
scf_params.list.columns.push("authorization.alg_level_write");
|
||||
scf_params.list.columns.push("authorization.prs_level_write");
|
||||
}
|
||||
}
|
||||
if (disc_key > 0)
|
||||
|
||||
Reference in New Issue
Block a user