diff --git a/APPL/API2/model_fac_functie.inc b/APPL/API2/model_fac_functie.inc index 6184c316e2..50a8c41884 100644 --- a/APPL/API2/model_fac_functie.inc +++ b/APPL/API2/model_fac_functie.inc @@ -22,12 +22,12 @@ function model_fac_functie (functie_key, params) this.primary = "fac_functie_key"; this.records_name = "fac_functies"; this.record_name = "fac_functie"; - var module = null; + this.module = null; if (params.disc_key > 0) { var sql = "SELECT ins_discipline_module FROM ins_tab_discipline WHERE ins_discipline_key = " + params.disc_key; var oRs = Oracle.Execute(sql); - var module = oRs("ins_discipline_module").Value; + this.module = oRs("ins_discipline_module").Value; oRs.Close(); } this.fields = { @@ -44,7 +44,7 @@ function model_fac_functie (functie_key, params) "label": L("fac_functie_module"), "readonly": true, "typ": "varchar", - "filterdefault": module?":!"+module:null, + "filterdefault": this.module?":!"+this.module:null, "foreign": { "tbl": "fac_module", "key": "fac_module_name", @@ -62,6 +62,7 @@ function model_fac_functie (functie_key, params) "label": L("fac_functie_min_level"), "readonly": true, "typ": "number", + "LOV": L("fac_functie_min_levelLOV"), "hidden_fld": true }, "discipline": { @@ -69,6 +70,7 @@ function model_fac_functie (functie_key, params) "label": L("fac_functie_discipline"), "readonly": true, "typ": "number", + "LOV": "0;Globaal;1;Per discipline", "hidden_fld": true }, "nn_discipline": { @@ -111,14 +113,15 @@ function model_fac_functie (functie_key, params) } var xparams = null; - if (module) + if (params.disc_key > 0) + { xparams = { GET: { wheres: ["fac_functie_module = " + safe.quoted_sql(module), "fac_functie_discipline = 1" // dan ook alleen de discipline gebonden functies ] } } - + } this.REST_GET = generic_REST_GET(this, xparams); - this.REST_POST = generic_REST_POST(this); - this.REST_PUT = generic_REST_PUT(this); - this.REST_DELETE = generic_REST_DELETE(this); + //this.REST_POST = generic_REST_POST(this); + //this.REST_PUT = generic_REST_PUT(this); + //this.REST_DELETE = generic_REST_DELETE(this); } %> \ No newline at end of file diff --git a/APPL/API2/model_fac_groeprechten.inc b/APPL/API2/model_fac_groeprechten.inc index 5509aad71c..7f12645c5f 100644 --- a/APPL/API2/model_fac_groeprechten.inc +++ b/APPL/API2/model_fac_groeprechten.inc @@ -272,63 +272,7 @@ sSQL = sSQL & " AND EXISTS"&_ " OR ff.fac_functie_code = 'WEB_' || m.fac_module_name || 'MSU'"&_ " ))" -if getParam("FAC_GROEP_KEY") <> "" then - fldFAC_GROEP_KEY = getParam("FAC_GROEP_KEY") -end if -sqlGroepOmschr = "select fac_groep_omschrijving from fac_groep where fac_groep_key = " & ToSQL(fldFAC_GROEP_KEY, "Number") -openrs rsGroep,sqlGroepOmschr -if not rsGroep.EOF then - sFormTitle = "Rechten van groep "& ToHTML(getValue(rsGroep,"fac_groep_omschrijving")) -end if -rsGroep.Close - -transit = "?sFAC_GROEP_UPPER=" & ToURL(GetParam("sFAC_GROEP_UPPER")) -setvar "Footer",""&FCLTLCL("Terug naar overzicht")&"" - ----------------------------- -Page event show: -if ((fldFAC_FUNCTIE_DISCIPLINE = "") or (fldFAC_FUNCTIE_DISCIPLINE="0")) then - 'Autorisatie is op functie niveau. Kijk of er al autorisaties aangegeven zijn. - sqlGroepRechten = "select * from fac_groeprechten where fac_groep_key = " & ToSQL(fldFAC_GROEP_KEY, "Number")&" and fac_functie_key = " & ToSQL(fldFAC_FUNCTIE_KEY, "Number") - openrs rsGroepRechten,sqlGroepRechten - if not rsGroepRechten.EOF then - 'Autorisaties bestaan - prs_read = decode_org_level(getValue(rsGroepRechten,"fac_gebruiker_prs_level_read")) - prs_write = decode_org_level(getValue(rsGroepRechten,"fac_gebruiker_prs_level_write")) - alg_read = decode_pos_level(getValue(rsGroepRechten,"fac_gebruiker_alg_level_read")) - alg_write = decode_pos_level(getValue(rsGroepRechten,"fac_gebruiker_alg_level_write")) - fldFAC_GEBRUIKER_PRS_LEVEL_READ = prs_read - fldFAC_GEBRUIKER_PRS_LEVEL_WRITE = prs_write - fldFAC_GEBRUIKER_ALG_LEVEL_READ = alg_read - fldFAC_GEBRUIKER_ALG_LEVEL_WRITE = alg_write - fldFAC_FUNCTIE_OMSCHRIJVING_FAC_GROEPRECHTEN_KEY = getValue(rsGroepRechten,"fac_groeprechten_key") - else - fldFAC_GEBRUIKER_PRS_LEVEL_READ = FCLTLCL("Geen") - fldFAC_GEBRUIKER_PRS_LEVEL_WRITE = FCLTLCL("Geen") - fldFAC_GEBRUIKER_ALG_LEVEL_READ = FCLTLCL("Geen") - fldFAC_GEBRUIKER_ALG_LEVEL_WRITE = FCLTLCL("Geen") - fldFAC_FUNCTIE_OMSCHRIJVING_FAC_GROEPRECHTEN_KEY = "" - end if - rsGroepRechten.Close -else - 'autorisatie is op discipline niveau - s_filter = "" - if getParam("FAC_FUNCTIE_MODULE") <> "" then - s_filter = "&fac_functie_module_filter="& ToURL(getParam("FAC_FUNCTIE_MODULE")) - end if - details = "" - fldFAC_FUNCTIE_OMSCHRIJVING = ""&fldFAC_FUNCTIE_OMSCHRIJVING&"" - fldFAC_FUNCTIE_OMSCHRIJVING = ""&details&fldFAC_FUNCTIE_OMSCHRIJVING&"" - fldFAC_GEBRUIKER_PRS_LEVEL_READ = "..." - fldFAC_GEBRUIKER_PRS_LEVEL_WRITE = "..." - fldFAC_GEBRUIKER_ALG_LEVEL_READ = "..." - fldFAC_GEBRUIKER_ALG_LEVEL_WRITE = "..." -end if ---------------------------- Page event customsecurity: @@ -348,62 +292,5 @@ sSQL = sSQL & " AND EXISTS"&_ " OR ff.fac_functie_code = 'WEB_' || m.fac_module_name || 'MSU'"&_ " ))" -if getParam("FAC_GROEP_KEY") <> "" then - fldFAC_GROEP_KEY = getParam("FAC_GROEP_KEY") -end if - -sqlGroepOmschr = "select fac_groep_omschrijving from fac_groep where fac_groep_key = " & ToSQL(fldFAC_GROEP_KEY, "Number") -openrs rsGroep,sqlGroepOmschr -if not rsGroep.EOF then - sFormTitle = "Rechten van groep "& ToHTML(getValue(rsGroep,"fac_groep_omschrijving")) -end if -rsGroep.Close - -transit = "?sFAC_GROEP_UPPER=" & ToURL(GetParam("sFAC_GROEP_UPPER")) -setvar "Footer",""&FCLTLCL("Terug naar overzicht")&"" - ----------------------------- -Form event show: -if ((fldFAC_FUNCTIE_DISCIPLINE = "") or (fldFAC_FUNCTIE_DISCIPLINE="0")) then - 'Autorisatie is op functie niveau. Kijk of er al autorisaties aangegeven zijn. - sqlGroepRechten = "select * from fac_groeprechten where fac_groep_key = " & ToSQL(fldFAC_GROEP_KEY, "Number")&" and fac_functie_key = " & ToSQL(fldFAC_FUNCTIE_KEY, "Number") - openrs rsGroepRechten,sqlGroepRechten - if not rsGroepRechten.EOF then - 'Autorisaties bestaan - prs_read = decode_org_level(getValue(rsGroepRechten,"fac_gebruiker_prs_level_read")) - prs_write = decode_org_level(getValue(rsGroepRechten,"fac_gebruiker_prs_level_write")) - alg_read = decode_pos_level(getValue(rsGroepRechten,"fac_gebruiker_alg_level_read")) - alg_write = decode_pos_level(getValue(rsGroepRechten,"fac_gebruiker_alg_level_write")) - fldFAC_GEBRUIKER_PRS_LEVEL_READ = prs_read - fldFAC_GEBRUIKER_PRS_LEVEL_WRITE = prs_write - fldFAC_GEBRUIKER_ALG_LEVEL_READ = alg_read - fldFAC_GEBRUIKER_ALG_LEVEL_WRITE = alg_write - fldFAC_FUNCTIE_OMSCHRIJVING_FAC_GROEPRECHTEN_KEY = getValue(rsGroepRechten,"fac_groeprechten_key") - else - fldFAC_GEBRUIKER_PRS_LEVEL_READ = FCLTLCL("Geen") - fldFAC_GEBRUIKER_PRS_LEVEL_WRITE = FCLTLCL("Geen") - fldFAC_GEBRUIKER_ALG_LEVEL_READ = FCLTLCL("Geen") - fldFAC_GEBRUIKER_ALG_LEVEL_WRITE = FCLTLCL("Geen") - fldFAC_FUNCTIE_OMSCHRIJVING_FAC_GROEPRECHTEN_KEY = "" - end if - rsGroepRechten.Close -else - 'autorisatie is op discipline niveau - s_filter = "" - if getParam("FAC_FUNCTIE_MODULE") <> "" then - s_filter = "&fac_functie_module_filter="& ToURL(getParam("FAC_FUNCTIE_MODULE")) - end if - details = "" - fldFAC_FUNCTIE_OMSCHRIJVING = ""&fldFAC_FUNCTIE_OMSCHRIJVING&"" - fldFAC_FUNCTIE_OMSCHRIJVING = ""&details&fldFAC_FUNCTIE_OMSCHRIJVING&"" - fldFAC_GEBRUIKER_PRS_LEVEL_READ = "..." - fldFAC_GEBRUIKER_PRS_LEVEL_WRITE = "..." - fldFAC_GEBRUIKER_ALG_LEVEL_READ = "..." - fldFAC_GEBRUIKER_ALG_LEVEL_WRITE = "..." -end if */ %> \ No newline at end of file diff --git a/APPL/API2/model_ins_tab_discipline.inc b/APPL/API2/model_ins_tab_discipline.inc index e30c5c1b52..829d13bb42 100644 --- a/APPL/API2/model_ins_tab_discipline.inc +++ b/APPL/API2/model_ins_tab_discipline.inc @@ -20,8 +20,8 @@ function model_ins_tab_discipline(disc_key, params) { this.table = "ins_tab_discipline"; this.primary = "ins_discipline_key"; - this.records_name = "reservationcatalogs"; - this.record_name = "reservationcatalog"; + this.records_name = "disciplines"; + this.record_name = "discipline"; this.fields = { "id": { "dbs": "ins_discipline_key", @@ -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.level = Oracle.Get("fac_functie_min_level", "fac_functie", params.functie_key); xparams = { GET: { wheres: ["ins_discipline_module = " + safe.quoted_sql(this.module)] } } } diff --git a/APPL/MGT/fac_edit_groeprechten.asp b/APPL/MGT/fac_edit_groeprechten.asp index e98268c1a7..67f85135ca 100644 --- a/APPL/MGT/fac_edit_groeprechten.asp +++ b/APPL/MGT/fac_edit_groeprechten.asp @@ -32,6 +32,7 @@ var fdisc = oRs("fac_functie_discipline").Value; if (fdisc) var disc_key = getQParamInt("ins_discipline"); var fdesc = oRs("fac_functie_omschrijving").Value; +var finfo = oRs("fac_functie_info").Value; oRs.Close(); var sql = "SELECT * " @@ -42,15 +43,40 @@ var gdesc = oRs("fac_groep_omschrijving").Value; var gremark = oRs("fac_groep_opmerking").Value; oRs.Close(); -function radioTD(name, label, LOV, val) +var transitParam = buildTransitParam(["fac_groep", "fac_functie", "ins_discipline"]); + +var prsread = 9; +var prswrite = 9; +var algread = 9; +var algwrite = 9; +var sql = "SELECT *" + + " FROM fac_groeprechten" + + " WHERE fac_groep_key = " + groep_key + + " AND fac_functie_key = " + functie_key; +if (fdisc) + sql += " AND ins_discipline_key = " + disc_key; +var oRs = Oracle.Execute(sql); +var gr_key = -1; +if (!oRs.Eof) { - Response.Write("\n