Scope moet uit filter komen, niet uit querystring

svn path=/Website/trunk/; revision=24397
This commit is contained in:
Jos Groot Lipman
2015-03-10 16:20:29 +00:00
parent ad7a70134f
commit b943a64305
7 changed files with 14 additions and 13 deletions

View File

@@ -76,7 +76,7 @@ model_issues =
REST_GET: function _GET(params)
{
var scope = getQParamSafe("scope", "fe");
var scope = params.filter.scope || "fe";
var autfunction = { fe : "WEB_MLDUSE", fo : "WEB_MLDFOF", bo : "WEB_MLDBOF", mi : "WEB_MLDBAC" } [scope];
params.authparams = user.checkAutorisation(autfunction, null, null, true); /* pessimistic */
@@ -413,7 +413,7 @@ model_issues =
REST_PUT: function (params, jsondata, the_key) /* update call */
{
if (!jsondata.issue.id) jsondata.issue.id = the_key;
var scope = getQParamSafe("scope", "fe");
var scope = params.filter.scope || "fe";
var autfunction = { fe : "WEB_MLDUSE", fo : "WEB_MLDFOF", bo : "WEB_MLDBOF", mi : "WEB_MLDBAC" } [scope];
params.authparams = user.checkAutorisation(autfunction, null, null, true); /* pessimistic */
@@ -456,7 +456,7 @@ model_issues =
REST_POST: function (params, jsondata) /* new call */
{
var scope = getQParamSafe("scope", "fe");
var scope = params.filter.scope || "fe";
var autfunction = { fe : "WEB_MLDUSE", fo : "WEB_MLDFOF", bo : "WEB_MLDBOF", mi : "WEB_MLDBAC" } [scope];
params.authparams = user.checkAutorisation(autfunction, null, null, true); /* pessimistic */
@@ -496,7 +496,7 @@ model_issues =
REST_DELETE: function (params, jsondata, the_key) /* delete call */
{
// Een melding wordt niet verwijderd maar wordt afgesloten.
var scope = getQParamSafe("scope", "fe");
var scope = params.filter.scope || "fe";
var autfunction = { fe : "WEB_MLDUSE", fo : "WEB_MLDFOF", bo : "WEB_MLDBOF", mi : "WEB_MLDBAC" } [scope];
params.authparams = user.checkAutorisation(autfunction, null, null, true); /* pessimistic */