FSN#36229 autorisatiebeheer verbeteringen
svn path=/Website/trunk/; revision=33003
This commit is contained in:
@@ -109,11 +109,6 @@ function model_fac_functie (functie_key, params)
|
||||
|
||||
if (params.groep_key > 0 || params.disc_key > 0)
|
||||
{
|
||||
var groepmodel = new model_fac_groeprechten(params);
|
||||
var outertoggle = { def: false, lbl: L("fac_gebruiker_outerfunctie") }
|
||||
// var data = groepmodel.REST_GET({ filter: params });
|
||||
// if (data.length)
|
||||
// outertoggle = { def: true, lbl: L("fac_gebruiker_outerfunctie") + " ({0})".format(data.length)}
|
||||
this.includes = {"authorization":
|
||||
{ "model": new model_fac_groeprechten(params),
|
||||
"joinfield": "authorization",
|
||||
|
||||
@@ -238,7 +238,9 @@ function model_fac_groeprechten (params)
|
||||
this.tablesql = "(SELECT MIN(fac_groeprechten_key) fac_groeprechten_key,"
|
||||
+ " fac_groep_key,"
|
||||
+ " g.fac_functie_key,"
|
||||
/* missen we dit ooit?
|
||||
+ " f.fac_functie_min_level,"
|
||||
*/
|
||||
+ " CASE"
|
||||
+ " WHEN fac_functie_discipline = 1"
|
||||
+ " THEN fac_functie_module || ' ' || "
|
||||
@@ -257,10 +259,12 @@ function model_fac_groeprechten (params)
|
||||
+ " AND g.fac_functie_key = f.fac_functie_key"
|
||||
+ " GROUP BY fac_groep_key, g.fac_functie_key, fac_functie_discipline, fac_functie_min_level, fac_functie_module) fac_groeprechten";
|
||||
this.record_title += " TODO Groep: " + params.groep_key;
|
||||
/* missen we dit ooit?
|
||||
this.fields["basislevelread"].val = fnRechten;
|
||||
this.fields["basislevelwrite"].val = fnRechten;
|
||||
this.fields["realestatelevelread"].val = fnRechten;
|
||||
this.fields["realestatelevelwrite"].val = fnRechten;
|
||||
*/
|
||||
this.fields["discipline"] =
|
||||
{
|
||||
"dbs": "nn_disc",
|
||||
|
||||
@@ -89,6 +89,18 @@
|
||||
scf_params.list.default_action = "edit_rechten";
|
||||
}
|
||||
|
||||
if (mode == "search" && groep_key > 0) // Als er al rechten zijn, tonen we default alleen geauthoriseerde functies
|
||||
{
|
||||
var groepmodel = new model_fac_groeprechten({ disc_key: disc_key, groep_key: groep_key })
|
||||
var data = groepmodel.REST_GET({ include: ["authorization"], filter: { disc_key: disc_key, groep_key: groep_key } });
|
||||
|
||||
if (data.length)
|
||||
{
|
||||
model.includes.authorization.outertoggle.def = true;
|
||||
scf_params.search.autosearch = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (groep_key > 0)
|
||||
{
|
||||
var groep_desc = Oracle.Get("fac_groep_omschrijving", "fac_groep", groep_key);
|
||||
|
||||
@@ -88,6 +88,17 @@
|
||||
scf_params.list.columns.push("authorization.discipline");
|
||||
}
|
||||
|
||||
if (mode == "search" && functie_key > 0) // Als er al rechten zijn, tonen we default alleen geauthoriseerde functies
|
||||
{
|
||||
var groepmodel = new model_fac_groeprechten({ disc_key: disc_key, functie_key: functie_key })
|
||||
var data = groepmodel.REST_GET({ filter: { disc_key: disc_key, functie_key: functie_key } });
|
||||
if (data.length)
|
||||
{
|
||||
model.includes.authorization.outertoggle.def = true;
|
||||
scf_params.list.autosearch = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (functie_key > 0)
|
||||
{
|
||||
var func_desc = Oracle.Get("lcl.l(fac_functie_omschrijving,1)", "fac_functie", functie_key);
|
||||
|
||||
@@ -66,6 +66,18 @@
|
||||
|
||||
if (groep_key > 0 && functie_key > 0)
|
||||
{
|
||||
if (mode == "search" && groep_key > 0) // Als er al rechten zijn, tonen we default alleen geauthoriseerde functies
|
||||
{
|
||||
var groepmodel = new model_fac_groeprechten({ functie_key: functie_key, groep_key: groep_key })
|
||||
var data = groepmodel.REST_GET({ include: ["authorization"], filter: { functie_key: functie_key, groep_key: groep_key } });
|
||||
|
||||
if (data.length)
|
||||
{
|
||||
model.includes.authorization.outertoggle.def = true;
|
||||
scf_params.search.autosearch = true;
|
||||
}
|
||||
}
|
||||
|
||||
var groep_desc = Oracle.Get("fac_groep_omschrijving", "fac_groep", groep_key);
|
||||
var func_desc = Oracle.Get("lcl.l(fac_functie_omschrijving, 1)", "fac_functie", functie_key);
|
||||
scf_params.search.title = groep_desc + "/" + func_desc;
|
||||
|
||||
Reference in New Issue
Block a user