FCLT#58053: verborgen notities ook niet via de API
svn path=/Website/branches/v2019.1/; revision=42859
This commit is contained in:
@@ -98,9 +98,6 @@ function model_issues(mld_key, params)
|
||||
|
||||
this.REST_GET = function _GET(params)
|
||||
{
|
||||
var query = api2.sqlfields(params, this );
|
||||
query.wheres.push("mld_melding.fac_activiteit_key IS NULL");
|
||||
|
||||
// Als je een filter-id meegeeft werken we scopeloos/ heel nauwkeurig
|
||||
if (params.filter.id)
|
||||
{
|
||||
@@ -110,9 +107,23 @@ function model_issues(mld_key, params)
|
||||
{ // XD: zoeken op niet-bestaande key geeft anders een AiAi.
|
||||
var this_mld = mld.func_enabled_melding(params.filter.id);
|
||||
user.auth_required_or_abort(this_mld.canReadAny);
|
||||
if (this_mld.haveOnlyFErights)
|
||||
{
|
||||
this.includes["notes"].model.gparams = { "GET": { wheres: ["BITAND(mld_melding_note_flag,1) = 1"] } };
|
||||
}
|
||||
}
|
||||
oRs.Close();
|
||||
}
|
||||
else // In lijst nooit verborgen notities. Veel te ingewikeld met autorisatie
|
||||
this.includes["notes"].model.gparams = { "GET": { wheres: ["BITAND(mld_melding_note_flag,1) = 1"] } };
|
||||
|
||||
var query = api2.sqlfields(params, this );
|
||||
query.wheres.push("mld_melding.fac_activiteit_key IS NULL");
|
||||
|
||||
if (params.filter.id)
|
||||
{
|
||||
// klaar verder
|
||||
}
|
||||
else
|
||||
{
|
||||
var scope = params.filter.scope || "fe";
|
||||
|
||||
Reference in New Issue
Block a user