Files
Facilitor/APPL/API2/model_aut_client_perslid.inc
Jos Groot Lipman 7fc5d9058e FSN#39750 Authenticatie 'Apps', savepoint
svn path=/Website/trunk/; revision=33262
2017-03-26 15:46:37 +00:00

106 lines
3.2 KiB
PHP

<% /*
$Revision$
$Id$
File: model_aut_client_perslid.inc
Description: Persoonlijke instellingen per Client/app
Notes:
*/
function model_aut_client_perslid()
{
this.records_name = "clientpersons";
this.record_name = "clientperson";
this.table = "aut_client_perslid";
this.primary = "aut_client_perslid_key";
this.autfunction = "WEB_FACFAC";
this.record_title = L("aut_client_perslid");
this.records_title = L("aut_client_perslid_m");
this.fields = {
"id": {
"dbs": "aut_client_perslid_key",
"label": L("lcl_key"),
"typ": "key",
"seq": "aut_s_aut_client_perslid_key"
},
"autclient": {
"dbs": "aut_client_key",
"label": L("aut_client"),
"typ": "key",
"hidden_fld": true,
"required": true
},
"device": {
"dbs": "aut_client_perslid_device_id",
"label": L("aut_client_perslid_device"),
"typ": "varchar"
},
"scope": {
"dbs": "aut_client_perslid_scope",
"label": L("aut_client_perslid_scope"),
"typ": "varchar"
},
"pushtoken": {
"dbs": "aut_client_perslid_pushtoken",
"label": L("aut_client_perslid_pushtoken"),
"typ": "varchar",
"filter": "exact"
},
"refreshtoken": {
"dbs": "aut_client_perslid_refreshtkn",
"label": L("aut_client_perslid_refreshtoken"),
"typ": "varchar",
"filter": "exact"
},
"refreshdate": {
"dbs": "aut_client_perslid_refreshdate",
"label": L("aut_client_perslid_refreshdate"),
"typ": "datetime"
},
"accesstoken": {
"dbs": "aut_client_perslid_accesstoken",
"label": L("aut_client_perslid_accesstoken"),
"typ": "varchar",
"filter": "exact"
},
"accessdate": {
"dbs": "aut_client_perslid_accessdate",
"label": L("aut_client_perslid_accessdate"),
"typ": "datetime"
},
"login": {
"dbs": "aut_client_perslid_login",
"label": L("aut_client_perslid_login"),
"typ": "datetime"
},
"person": {
"dbs": "prs_perslid_key",
"label": L("lcl_user"),
"typ": "key",
"foreign" : "prs_perslid"
}
}
this.edit = {
"modal": true
};
this.list = {
"columns": ["person", "scope", "device"]
};
this.REST_GET = function (params, jsondata)
{
if (user_key > 0 && "filter" in params && params.filter.id == user_key)
this.autfunction = false;
else if ("filter" in params && "accesstoken" in params.filter)
this.autfunction = false;
return generic_REST_GET(this)(params, jsondata);
}
this.REST_POST = generic_REST_POST(this);
this.REST_PUT = generic_REST_PUT(this);
this.REST_DELETE = generic_REST_DELETE(this);
}
%>