Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tvd0x2a
Copy link

@tvd0x2a tvd0x2a commented Mar 19, 2024

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.

@tvd0x2a
Copy link
Author

tvd0x2a commented Mar 19, 2024

I opened this as a draft for any early feedback/direction/advice. I will do some testing and then submit for review. Thanks!

tvd0x2a added 2 commits March 19, 2024 01:46
### 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.
@tvd0x2a tvd0x2a marked this pull request as ready for review March 19, 2024 08:46
$remoteSync = Craft::$app->plugins->getPlugin("remote-sync");
$settings = $remoteSync->getSettings();
if (!property_exists($settings, 'disableRestore')) {
Craft::$app->getPlugins()->savePluginSettings($remoteSync, [
Copy link
Author

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?

@timmyomahony
Copy link
Owner

Thanks @tvd0x2a for the work on this. Let me review.

@tvd0x2a
Copy link
Author

tvd0x2a commented Apr 24, 2024

Hi @timmyomahony, when do you think you'll have a chance to review? Thx!

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