Skip to content

Add preventSchemaEdits option to apps and hide or disable buttons to manipulate classes and columns #960

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

cyrilchandelier
Copy link
Contributor

In a project using Parse Dashboard as a middleware of a Parse Server, I want to disable the actions modifying the schema.

I know there is way to fail these actions when using the readOnlyMasterKey, but I need to let my user add / edit / delete rows, I just want them to not change the schema. The best way I found so far is to hide the buttons:

  • "Create a class" in the Browser
  • "Add a column" in the BrowserTable
  • "Security" and all options related to columns and classes from the Edit dropdown

To support that, I added a new preventSchemaEdits option to apps, defaulted to false.

Eg:

{
  "apps": [{
    "serverURL": "http://localhost:1337/parse",
    "appId": "hello",
    "masterKey": "world",
    "appName": "",
    "iconName": "",
    "primaryBackgroundColor": "",
    "secondaryBackgroundColor": "",
    "preventSchemaEdits": true
  }],
  "iconsFolder": "icons"
}

Any feedback welcome.

Copy link
Contributor

@flovilmart flovilmart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this feature, I know it would be non trivial to implement server side!

@flovilmart flovilmart merged commit 4eac5f3 into parse-community:master Jan 17, 2019
@flovilmart
Copy link
Contributor

Thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants