FSN#39455 Geheime keys initieel verbergen in showmode
svn path=/Website/trunk/; revision=32758
This commit is contained in:
@@ -51,7 +51,8 @@ function fac_idp()
|
||||
"dbs": "fac_idp_secret",
|
||||
"label": L("fac_idp_secret"),
|
||||
"typ": "varchar",
|
||||
"defaultvalue": shared.random(32)
|
||||
"defaultvalue": shared.random(32),
|
||||
"secret": true
|
||||
},
|
||||
"audience": {
|
||||
"dbs": "fac_idp_audience",
|
||||
|
||||
@@ -196,6 +196,9 @@ function model_generic(table, autfunction)
|
||||
if (fld == model.table + "_aanmaak")
|
||||
field.readonly = true;
|
||||
|
||||
if (field.dbs.match(/(salt|hash|secret|password|apikey|authenticatie)$/)) // hier fac_tracking_refkey ook herkennen
|
||||
field.secret = true;
|
||||
|
||||
if (fld == model.primary)
|
||||
{
|
||||
field.filter = "exact";
|
||||
|
||||
@@ -281,7 +281,7 @@ var prs_user = new Perslid(prs_key);
|
||||
var showkey = prs_apikey;
|
||||
if (!prsauthparams.writetab)
|
||||
var showkey = showkey.substr(0,3) + "..." + showkey.substr(showkey.length-3);
|
||||
ROFIELDTR("fld", L("lcl_prs_apiuser"), showkey, {suppressEmpty: true});
|
||||
ROFIELDTR("fld", L("lcl_prs_apiuser"), showkey, {suppressEmpty: true, secret: true });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -225,7 +225,7 @@ function scf_ROFIELDTR(model, fld, val, key, params)
|
||||
if (field.iscurrency)
|
||||
txt = safe.curr(txt);
|
||||
|
||||
var params = { title: title, infoPointer: infoPointer, org_lcl: org_lcl };
|
||||
var params = { title: title, infoPointer: infoPointer, org_lcl: org_lcl, secret: field.secret };
|
||||
if (field.translate && key)
|
||||
params.translate = { fld: field.dbs, key: key }
|
||||
|
||||
|
||||
@@ -375,7 +375,11 @@ function scaffolding_list(model, scf_params)
|
||||
if (field.hidden) // Bij een detailrecord is de parent_key op hidden gezet
|
||||
continue;
|
||||
|
||||
var coldata = { caption: field.orglabel? field.orglabel: field.label, content: fld, datatype: field.typ, total: field.total };
|
||||
var coldata = { caption: field.orglabel? field.orglabel: field.label,
|
||||
content: fld,
|
||||
datatype: field.typ,
|
||||
total: field.total,
|
||||
secret: field.secret };
|
||||
if (outputmode == 4)
|
||||
{
|
||||
coldata.caption = fld; // Naar csv altijd veldnaam
|
||||
|
||||
@@ -292,6 +292,9 @@ function ROFIELD(pclass, plabel, pvalue, params)
|
||||
}
|
||||
input += " onclick='" + safe.htmlattr(fnclick) + "'";
|
||||
}
|
||||
if (params.secret)
|
||||
input += " title='{0}' onclick='this.innerText=this.title'>".format(safe.htmlattr(pvalue)) + "<i class='fa fa-eye fa-lg'></i></span>";
|
||||
else
|
||||
input += ">" + safe.html(pvalue) + "</span>";
|
||||
Response.Write(input);
|
||||
if (params.selector) {
|
||||
|
||||
@@ -1668,6 +1668,9 @@ ResultsetTable.formatValue = function (val, params) //datatype, decimals)
|
||||
__Log("Ongespecificeerd datatype van veld '{0}'{1} is {2}, fallback naar string".format(params.caption, typeof params.orgContent=='string'?' (' + params.orgContent + ')':"", typeof val), "#FF0");
|
||||
val = String(val);
|
||||
}
|
||||
if (params.secret)
|
||||
return "<span title='{0}'>".format(safe.htmlattr(val)) + "<i class='fa fa-eye fa-lg'></i></span>";
|
||||
|
||||
val = shared.stripbbcodes(val);
|
||||
|
||||
if (isXMLXSL || isCSV)
|
||||
|
||||
Reference in New Issue
Block a user