[dreamwidth/dw-free] 430ee3: Fix change_journal_type console command to assign ...
Branch: refs/heads/master
Home: https://github.com/dreamwidth/dw-free
Commit: 430ee3ee27cf672f52c78179dd23929d3946da10
https://github.com/dreamwidth/dw-free/commit/430ee3ee27cf672f52c78179dd23929d3946da10
Author: Kareila <kareila@dreamwidth.org>
Date: 2020-06-02 (Tue, 02 Jun 2020)
Changed paths:
M bin/upgrading/en.dat
M cgi-bin/LJ/Console/Command/ChangeJournalType.pm
M cgi-bin/LJ/User/Message.pm
M t/console-changejournaltype.t
Log Message:
-----------
Fix change_journal_type console command to assign a new password
This command had been temporarily disabled because when changing a community journal to a personal journal, the old behavior was to copy both the email and password of the named community admin over to the converted journal. But the previously used method for accessing that password was recently removed in favor of better password practices, so we needed a different solution for that aspect of the change.
The modifications here are copied in part from the reset_password console command, which uses LJ::rand_chars to generate a random string and assigns that as the value of the new password, then communicates it directly to the user via email with the expectation that it will immediately be changed.
The actions taken by the change_journal_type console command are executed by the reset_email user method, which sends a message asking the user to confirm the new email address for the journal. For the case where we are also changing the password, the message sent now asks the user to both confirm the email and change the password. In the case of converting to a community, the password is silently reset to the empty string.
Commit: 9d7153bcba1d5cebf9fa6042583593a177e8e12a
https://github.com/dreamwidth/dw-free/commit/9d7153bcba1d5cebf9fa6042583593a177e8e12a
Author: Kareila <kareila@dreamwidth.org>
Date: 2020-06-02 (Tue, 02 Jun 2020)
Changed paths:
M t/console-changejournaltype.t
Log Message:
-----------
Update test suite for change_journal_type command
- We haven't had a 'shared' journal type since before we forked.
- Check for blank password after converting to community, although this test will be a no-op once all accounts are on dversion 10.
Commit: 0e501afe9f950614065e90ae1a259e728f4bf414
https://github.com/dreamwidth/dw-free/commit/0e501afe9f950614065e90ae1a259e728f4bf414
Author: Kareila <kareila@dreamwidth.org>
Date: 2020-06-02 (Tue, 02 Jun 2020)
Changed paths:
M cgi-bin/LJ/Console/Command/ChangeJournalType.pm
M t/console-changejournaltype.t
Log Message:
-----------
Fix #2350
Prevent a personal account from being converted to a community if it still administers other communities.
Commit: 514ba9ca7befd4d92c16ef23d4fd4304edeb6ee5
https://github.com/dreamwidth/dw-free/commit/514ba9ca7befd4d92c16ef23d4fd4304edeb6ee5
Author: Mark Smith <mark@qq.is>
Date: 2020-06-02 (Tue, 02 Jun 2020)
Changed paths:
M bin/upgrading/en.dat
Log Message:
-----------
Add / after siteroot
There seem to be mixed uses here but I'm pretty sure production uses siteroot as 'https://www.dreamwidth.org' with no trailing slash?
Commit: 3f087ff1a4712ff5b9dd9fa8a452a21502c71356
https://github.com/dreamwidth/dw-free/commit/3f087ff1a4712ff5b9dd9fa8a452a21502c71356
Author: Mark Smith <mark@qq.is>
Date: 2020-06-02 (Tue, 02 Jun 2020)
Changed paths:
M bin/upgrading/en.dat
Log Message:
-----------
Back out my siteroot change.
Compare: https://github.com/dreamwidth/dw-free/compare/444792e41e38...3f087ff1a471
Home: https://github.com/dreamwidth/dw-free
Commit: 430ee3ee27cf672f52c78179dd23929d3946da10
https://github.com/dreamwidth/dw-free/commit/430ee3ee27cf672f52c78179dd23929d3946da10
Author: Kareila <kareila@dreamwidth.org>
Date: 2020-06-02 (Tue, 02 Jun 2020)
Changed paths:
M bin/upgrading/en.dat
M cgi-bin/LJ/Console/Command/ChangeJournalType.pm
M cgi-bin/LJ/User/Message.pm
M t/console-changejournaltype.t
Log Message:
-----------
Fix change_journal_type console command to assign a new password
This command had been temporarily disabled because when changing a community journal to a personal journal, the old behavior was to copy both the email and password of the named community admin over to the converted journal. But the previously used method for accessing that password was recently removed in favor of better password practices, so we needed a different solution for that aspect of the change.
The modifications here are copied in part from the reset_password console command, which uses LJ::rand_chars to generate a random string and assigns that as the value of the new password, then communicates it directly to the user via email with the expectation that it will immediately be changed.
The actions taken by the change_journal_type console command are executed by the reset_email user method, which sends a message asking the user to confirm the new email address for the journal. For the case where we are also changing the password, the message sent now asks the user to both confirm the email and change the password. In the case of converting to a community, the password is silently reset to the empty string.
Commit: 9d7153bcba1d5cebf9fa6042583593a177e8e12a
https://github.com/dreamwidth/dw-free/commit/9d7153bcba1d5cebf9fa6042583593a177e8e12a
Author: Kareila <kareila@dreamwidth.org>
Date: 2020-06-02 (Tue, 02 Jun 2020)
Changed paths:
M t/console-changejournaltype.t
Log Message:
-----------
Update test suite for change_journal_type command
- We haven't had a 'shared' journal type since before we forked.
- Check for blank password after converting to community, although this test will be a no-op once all accounts are on dversion 10.
Commit: 0e501afe9f950614065e90ae1a259e728f4bf414
https://github.com/dreamwidth/dw-free/commit/0e501afe9f950614065e90ae1a259e728f4bf414
Author: Kareila <kareila@dreamwidth.org>
Date: 2020-06-02 (Tue, 02 Jun 2020)
Changed paths:
M cgi-bin/LJ/Console/Command/ChangeJournalType.pm
M t/console-changejournaltype.t
Log Message:
-----------
Fix #2350
Prevent a personal account from being converted to a community if it still administers other communities.
Commit: 514ba9ca7befd4d92c16ef23d4fd4304edeb6ee5
https://github.com/dreamwidth/dw-free/commit/514ba9ca7befd4d92c16ef23d4fd4304edeb6ee5
Author: Mark Smith <mark@qq.is>
Date: 2020-06-02 (Tue, 02 Jun 2020)
Changed paths:
M bin/upgrading/en.dat
Log Message:
-----------
Add / after siteroot
There seem to be mixed uses here but I'm pretty sure production uses siteroot as 'https://www.dreamwidth.org' with no trailing slash?
Commit: 3f087ff1a4712ff5b9dd9fa8a452a21502c71356
https://github.com/dreamwidth/dw-free/commit/3f087ff1a4712ff5b9dd9fa8a452a21502c71356
Author: Mark Smith <mark@qq.is>
Date: 2020-06-02 (Tue, 02 Jun 2020)
Changed paths:
M bin/upgrading/en.dat
Log Message:
-----------
Back out my siteroot change.
Compare: https://github.com/dreamwidth/dw-free/compare/444792e41e38...3f087ff1a471