Allow protectedFields for Authenticated users and Public. Fix userField with keys/excludedKeys (#6415)
* fix error message and test it * protected fields fixes * clean * remove duplicate test, add some comments * no need for 'requiresAuthentication'
This commit is contained in:
@@ -6,6 +6,7 @@ import Parse from 'parse/node';
|
||||
const ALLOWED_GET_QUERY_KEYS = [
|
||||
'keys',
|
||||
'include',
|
||||
'excludeKeys',
|
||||
'readPreference',
|
||||
'includeReadPreference',
|
||||
'subqueryReadPreference',
|
||||
@@ -69,6 +70,9 @@ export class ClassesRouter extends PromiseRouter {
|
||||
if (body.include) {
|
||||
options.include = String(body.include);
|
||||
}
|
||||
if (typeof body.excludeKeys == 'string') {
|
||||
options.excludeKeys = body.excludeKeys;
|
||||
}
|
||||
if (typeof body.readPreference === 'string') {
|
||||
options.readPreference = body.readPreference;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user