Closed ghost closed 6 years ago
Thanks a lot for this PR!
Since Ownpad is used by a few people, I’d prefer not to “break” their configuration and not impose them to disallow “public pads” even if they enabled API support.
Then, we could either “reverse” your new option to something like “force pads to be private” (which will lead to an “insecure by default” configuration if you install Ownpad for the first time) or add a migration script to set ownpad_etherpad_public_enable
to yes
in case of an update from 0.6.5.
I’m also questioning myself about the wording we should use. “Protected pad” could be quite confusing I think (but, it’s another issue ;)).
Olivier;
I guess a migration script would be best in this case.
I was a bit confused how to use the MigrateSettings.php. Since it does only handle one migration at the time and the getName
function does not seem to support multiple migration configurations, you need to help me out with this ;-)
You can use the newly added command to generate SimpleMigrationStep
class:
sudo -u www-data php occ migrations:generate ownpad 0006
This will generate a file called like lib/Migration/Version0006Date20180213102615.php
which can contain the migration steps.
(To be fair, I didn’t pushed the process to the end, hope this will work).
Since SimpleMigrationStep
seems to be more suitable for schema updates than for simple config adjustments.
I've added a new IRepairStep
to enable the option when migrating from below 0.6.6
. I guess this is how it's supposed to be :-)
Thanks a lot for this PR!
I like to disable the public pads and only use the (experimental) API for protected pads, thus I need this option.
Allow “public” pads
would need a french translation thought ;-)