parse-community / parse-community/parse-server

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

Open
#7,745 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:question
Dominant language
JavaScript
Stars
21.4k
Forks
4.8k
Avg merge
7h 45m
Merged PRs (30d)
11

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the schema migration with the classLevelPermissions delete, update, and create settings shown in the issue. Trace how Parse Server validates and saves these permissions, then add or update coverage for false values and confirm that restricting these operations to master-only works without a migration error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, mongodb, node.js
Domain
authorization, backend, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.