-
Notifications
You must be signed in to change notification settings - Fork 4
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
New disableRestore setting #63
base: main
Are you sure you want to change the base?
Conversation
f70e937
to
4684f74
Compare
|
### Added - New setting `disableRestore` that allows the restore functionality to be disabled. For example, enables Craft admins to disable restore on one environment, like production, to avoid accidental overwrites.
0a824e0
to
4214e1f
Compare
$remoteSync = Craft::$app->plugins->getPlugin("remote-sync"); | ||
$settings = $remoteSync->getSettings(); | ||
if (!property_exists($settings, 'disableRestore')) { | ||
Craft::$app->getPlugins()->savePluginSettings($remoteSync, [ |
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.
I'm new to craft plugin development... is this needed?
Thanks @tvd0x2a for the work on this. Let me review. |
Hi @timmyomahony, when do you think you'll have a chance to review? Thx! |
Added
disableRestore
that allows the restore functionality to be disabled. For example, enables Craft admins to disable restore on one environment, like production, to avoid accidental overwrites.