@@ -1399,19 +1399,22 @@ export default class SchemaController {
13991399 return true ;
14001400 }
14011401 const perms = classPermissions [ operation ] ;
1402+ const config = Config . get ( Parse . applicationId )
14021403 // If only for authenticated users
14031404 // make sure we have an aclGroup
14041405 if ( perms [ 'requiresAuthentication' ] ) {
14051406 // If aclGroup has * (public)
14061407 if ( ! aclGroup || aclGroup . length == 0 ) {
14071408 throw createSanitizedError (
14081409 Parse . Error . OBJECT_NOT_FOUND ,
1409- 'Permission denied, user needs to be authenticated.'
1410+ 'Permission denied, user needs to be authenticated.' ,
1411+ config
14101412 ) ;
14111413 } else if ( aclGroup . indexOf ( '*' ) > - 1 && aclGroup . length == 1 ) {
14121414 throw createSanitizedError (
14131415 Parse . Error . OBJECT_NOT_FOUND ,
1414- 'Permission denied, user needs to be authenticated.'
1416+ 'Permission denied, user needs to be authenticated.' ,
1417+ config
14151418 ) ;
14161419 }
14171420 // requiresAuthentication passed, just move forward
@@ -1428,7 +1431,8 @@ export default class SchemaController {
14281431 if ( permissionField == 'writeUserFields' && operation == 'create' ) {
14291432 throw createSanitizedError (
14301433 Parse . Error . OPERATION_FORBIDDEN ,
1431- `Permission denied for action ${ operation } on class ${ className } .`
1434+ `Permission denied for action ${ operation } on class ${ className } .` ,
1435+ config
14321436 ) ;
14331437 }
14341438
@@ -1451,7 +1455,8 @@ export default class SchemaController {
14511455
14521456 throw createSanitizedError (
14531457 Parse . Error . OPERATION_FORBIDDEN ,
1454- `Permission denied for action ${ operation } on class ${ className } .`
1458+ `Permission denied for action ${ operation } on class ${ className } .` ,
1459+ config
14551460 ) ;
14561461 }
14571462
0 commit comments