Files
Facilitor/APPL/API2/model_fac_functie.inc
Jos Groot Lipman e0545a6ca4 FSN#35817 Autorisaties via API2/Scaffolding
svn path=/Website/trunk/; revision=28548
2016-03-21 09:02:54 +00:00

101 lines
2.7 KiB
PHP

<% /*
$Revision$
$Id$
File: model_fac_functie.inc
Description: Dit is het model om de *rechten* van een groep voor diverse
functies te beheren.
model_fac_functie moet dan ook altijd aangroepen worden met
een fac_groep_key
Context:
Notes:
*/
%>
<!-- #include file="../api2/model_fac_groeprechten.inc" -->
<%
function model_fac_functie (functie_key, params)
{
this.table = "fac_functie";
this.primary = "fac_functie_key";
this.records_name = "fac_functies";
this.record_name = "fac_functie";
this.fields = {
"id": {
"dbs": "fac_functie_key",
"label": "Key",
"typ": "key",
"required": true,
"filter": "exact",
"seq": "fac_s_fac_functie_key"
},
"module": {
"dbs": "fac_functie_module",
"label": L("fac_functie_module"),
"readonly": true,
"typ": "varchar",
"foreign": {
"tbl": "fac_module",
"key": "fac_module_name",
"desc": "fac_module_name || ' - ' || fac_module_remark"
}
},
"name": {
"dbs": "fac_functie_code",
"label": L("fac_functie_code"),
"readonly": true,
"typ": "varchar"
},
"level": {
"dbs": "fac_functie_min_level",
"label": L("fac_functie_min_level"),
"readonly": true,
"typ": "number",
"hidden_fld": true
},
"discipline": {
"dbs": "fac_functie_discipline",
"label": L("fac_functie_discipline"),
"readonly": true,
"typ": "number",
"hidden_fld": true
},
"description": {
"dbs": "fac_functie_omschrijving",
"label": L("fac_functie_omschrijving"),
"typ": "varchar",
"readonly": true,
"required": true
},
"info": {
"dbs": "fac_functie_info",
"label": L("fac_functie_info"),
"readonly": true,
"typ": "varchar"
}
};
if (params.groep_key > 0)
{
this.includes = {"authorization":
{ "model": new model_fac_groeprechten(params),
"joinfield": "fac_functie"
}};
}
this.autfunction = "WEB_PRSMSU";
this.record_title = L("fac_functie");
this.records_title = L("fac_functie_m");
this.edit = {
"modal": true
}
this.REST_GET = generic_REST_GET(this);
this.REST_POST = generic_REST_POST(this);
this.REST_PUT = generic_REST_PUT(this);
this.REST_DELETE = generic_REST_DELETE(this);
}
%>