Adding more information to the permission denied error (#2210)

This commit is contained in:
Blayne Chard
2016-07-08 03:30:29 +12:00
committed by Florent Vilmart
parent 944e5addd3
commit 8338783075
2 changed files with 10 additions and 10 deletions

View File

@@ -683,7 +683,7 @@ class SchemaController {
// Reject create when write lockdown
if (permissionField == 'writeUserFields' && operation == 'create') {
throw new Parse.Error(Parse.Error.OPERATION_FORBIDDEN,
'Permission denied for this action.');
`Permission denied for action ${operation} on class ${className}.`);
}
// Process the readUserFields later
@@ -691,7 +691,7 @@ class SchemaController {
return Promise.resolve();
}
throw new Parse.Error(Parse.Error.OPERATION_FORBIDDEN,
'Permission denied for this action.');
`Permission denied for action ${operation} on class ${className}.`);
};
// Returns the expected type for a className+key combination