Prevent updating when this is not allowed

I would like MainWP to implement the filemodallowed filter to stop installing themes, plugins and core.The items should still show as updates-available, just not installable like the behavior in WordPress.The reason we want this are;It is bad practice to update production sites without first verifying the updates on a test environment. We want to enforce this within our MainWP installationAll our plugins and themes are managed in git and installed using composer. We automatically deploy staging sites with updates and deploy to production sites once approved.This behavior was first partly available in MainWP but after #90 1 this is changed. But I don’t agree on this change. The correct solution to something like that I think would be something like:addfilter('filemodallowed', function($allowed, $context) { if($context == 'mainwp') return true; return $allowed;});And MainWP implementing the filemodallowed filter.You can see similar functionality in the WordPress automatic updater where you would add a similar code to allow auto-updates when DISALLOWFILEMODS is set to true. public function allowupdaterfilemod( $allowed, $context ){
if( $context == 'automatic_updater' ) return true;
return $allowed;
}

Please authenticate to join the conversation.

Upvoters
Status

In Review

Board
⚒️

Core Requests (Dashboard/Child)

Tags

Core Enhancement

Date

About 1 year ago

Author

Imported from Legacy Board

Subscribe to post

Get notified by email when there are changes.