verbb / patrol

Easy Maintenance Mode and Smart HTTPS Routing for Craft CMS
MIT License
29 stars 8 forks source link

Need a better handler for the auth IPs #24

Open jesuismaxime opened 4 years ago

jesuismaxime commented 4 years ago

It would be better if the plugin uses the database to store the IPs or at least merge the list from the patrol.php file with one from the project.yaml. The fact that only one of them is working is an issue when working with multiple environment. I juste wiped out my production IPs list because my local environment doesn’t have all the production auth IPs.

This will also allow changes in production when the Craft setting allowAdminChanges is net to false. For now it display a system error because the plugin isn’t able to push changes to the yaml file.

engram-design commented 2 years ago

Agreed. Not quite sure what the thinking was for re-saving plugin settings but that won't work at all on environments with allowAdminChanges = false.

jesuismaxime commented 2 years ago

Any update regarding this? Really need to have Patrol activated on staging/production environments where admin changes are not allowed.

engram-design commented 2 years ago

No update yet, sorry - but it'll take a little bit to get that sorted, and backwards-compatible.

Planning this to only be available for Craft 4 though, if that factors in on your end.

bartrylant commented 1 week ago

A bit late to the party bit I just bumped into this on Craft 5. The token adding an ip is a great function, but I have admin changes disabled on staging and live servers, so it just throws a server error.