Merge pull request #1068 from ParsePlatform/flovilmart.AllowRolesOps
Allows Operations on Roles
This commit is contained in:
@@ -115,11 +115,6 @@ function update(config, auth, className, objectId, restObject) {
|
|||||||
|
|
||||||
// Disallowing access to the _Role collection except by master key
|
// Disallowing access to the _Role collection except by master key
|
||||||
function enforceRoleSecurity(method, className, auth) {
|
function enforceRoleSecurity(method, className, auth) {
|
||||||
if (className === '_Role' && !auth.isMaster) {
|
|
||||||
throw new Parse.Error(Parse.Error.OPERATION_FORBIDDEN,
|
|
||||||
'Clients aren\'t allowed to perform the ' +
|
|
||||||
method + ' operation on the role collection.');
|
|
||||||
}
|
|
||||||
if (method === 'delete' && className === '_Installation' && !auth.isMaster) {
|
if (method === 'delete' && className === '_Installation' && !auth.isMaster) {
|
||||||
throw new Parse.Error(Parse.Error.OPERATION_FORBIDDEN,
|
throw new Parse.Error(Parse.Error.OPERATION_FORBIDDEN,
|
||||||
'Clients aren\'t allowed to perform the ' +
|
'Clients aren\'t allowed to perform the ' +
|
||||||
|
|||||||
Reference in New Issue
Block a user