Skip to content

ParseError: 107 'false' is not a valid value for class level permissions delete:*:false #7745

Open
@jonas-db

Description

@jonas-db

New Issue Checklist

Issue Description

I can't set CLP for delete to false. I want to do this so that only the master can delete objects. It is unclear from the documentation why this would not work.
The same error occurs for update and create!

Steps to reproduce

const TestSchema = 
{
	className: "Test123",
	classLevelPermissions: {
		delete: {
			'*': false
		}
	},

	fields: 
	{
		"objectId": {
			"type": "String"
		},
		"createdAt": {
			"type": "Date"
		},
		"updatedAt": {
			"type": "Date"
		},
		"ACL": {
			"type": "ACL"
		},
		"name": {
			"type": "String",
			"required": true
		},
	}
}

Create a server with following options:

  schema: {
    definitions: [
      TestSchema,
    ]
  },

Actual Outcome

error: Failed to run migrations: 
Error while saving Schema for type Test123: 
ParseError: 107 'false' is not a valid value for class level permissions delete:*:false

Expected Outcome

It should work?

Environment

Server

  • Parse Server version: ^5.0.0-beta.4
  • Operating system: macos
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): atlas

Database

  • System (MongoDB or Postgres): mongodb
  • Database version: ``
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): local

Client

  • SDK (iOS, Android, JavaScript, PHP, Unity, etc): latest
  • SDK version: latest

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:questionSupport or code-level question

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions