-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat: Add new options deleteOptions
, exportOptions
to manage delete and export permissions
#2850
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
feat: Add new options deleteOptions
, exportOptions
to manage delete and export permissions
#2850
Conversation
…tActions` properties
🚀 Thanks for opening this pull request! |
📝 WalkthroughWalkthroughThe changes introduce new configuration options for granular control over delete and export functionalities in the Parse Dashboard. These options are added to the dashboard config, passed through the ParseApp class, and conditionally control the rendering and enabling of related actions in the DataBrowser and BrowserToolbar React components. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant DashboardConfig
participant ParseApp
participant DataBrowser
participant BrowserToolbar
User->>DashboardConfig: Loads dashboard config (with delete/export options)
DashboardConfig->>ParseApp: Instantiates ParseApp with options
ParseApp->>DataBrowser: Passes deleteOptions/exportOptions via props
DataBrowser->>BrowserToolbar: Passes enabled/disabled flags for features
BrowserToolbar->>User: Renders menu items based on flags
User->>BrowserToolbar: Attempts action (e.g., delete/export)
BrowserToolbar-->>User: Allows or disables action per configuration
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
npm error code ERR_SSL_WRONG_VERSION_NUMBER 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
🧰 Additional context used🧬 Code Graph Analysis (1)src/dashboard/Data/Browser/BrowserToolbar.react.js (1)
🔇 Additional comments (10)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) |
deleteOptions
, exportOptions
to manage delete and export permissions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to me that it makes more sense to make this class specific, not as general options, similar to the syntax of columnPreference
:
"apps": [
{
"deletePreference": {
"_User": [
{
"enableDeleteClass": true,
"enableDeleteColumns": true,
"enableDeleteSelectedRows": true,
"enableDeleteAllRows": true,
},
]
}
"exportPreference": {
"_User": [
{
"enableExportSchema": true,
"enableExportSelectedRows": true,
"enableExportAllRows": true,
},
]
}
},
]
The class name could be parsed as RegEx, to allow for easy class config; to apply to all classes, you'd simply use .*
as classname.
And it may make more sense to combine these:
"apps": [
{
"classPreference": {
"_User": [
{
"enableDeleteClass": true,
"enableDeleteColumns": true,
"enableDeleteSelectedRows": true,
"enableDeleteAllRows": true,
"enableExportSchema": true,
"enableExportSelectedRows": true,
"enableExportAllRows": true,
},
]
}
},
]
TODO:
- Add new options to the README options table
- Add new section in README that explains the options
"deleteOptions": { | ||
"class": true, | ||
"columns": true, | ||
"selectedRows": true, | ||
"allData": true | ||
}, | ||
"exportOptions": { | ||
"schema": true, | ||
"selectedRows": true, | ||
"allData": true | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The names should be less ambiguous and follow the syntax of existing options:
"deleteOptions": { | |
"class": true, | |
"columns": true, | |
"selectedRows": true, | |
"allData": true | |
}, | |
"exportOptions": { | |
"schema": true, | |
"selectedRows": true, | |
"allData": true | |
} | |
"deletePreference": { | |
"enableDeleteClass": true, | |
"enableDeleteColumns": true, | |
"enableDeleteSelectedRows": true, | |
"enableDeleteAllRows": true, | |
}, | |
"exportPreference": { | |
"enableExportSchema": true, | |
"enableExportSelectedRows": true, | |
"enableExportAllRows": true, | |
} |
Changes
deleteOptions
for toggling delete operations on data browser toolbar;exportOptions
for toggling export operations on data browser toolbar.Summary by CodeRabbit
New Features
Refactor