Adding more information to the permission denied error (#2210)
This commit is contained in:
committed by
Florent Vilmart
parent
944e5addd3
commit
8338783075
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user