diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-05-03 12:05:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-03 12:05:24 +0200 |
commit | 58ac5ae643dc57ffd20017c54e7be523deaef156 (patch) | |
tree | 491e4afab8ab269096f6f68a3dfab08433954cda /lib | |
parent | cb9a919ff28294a2f1cf3642a165ad433cbf856b (diff) | |
parent | fa22b8ed229f93de1236a74d4df4a0b5fa57dddd (diff) |
Merge pull request #1761 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mastodon/settings_cli.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/mastodon/settings_cli.rb b/lib/mastodon/settings_cli.rb index 061650a80..488c655de 100644 --- a/lib/mastodon/settings_cli.rb +++ b/lib/mastodon/settings_cli.rb @@ -16,6 +16,20 @@ module Mastodon say('OK', :green) end + desc 'approved', 'Open approval-based registrations' + option :require_reason, type: :boolean, aliases: [:require_invite_text] + long_desc <<~LONG_DESC + Set registrations to require review from staff. + + With --require-reason, require users to enter a reason when registering, + otherwise this field is optional. + LONG_DESC + def approved + Setting.registrations_mode = 'approved' + Setting.require_invite_text = options[:require_reason] unless options[:require_reason].nil? + say('OK', :green) + end + desc 'close', 'Close registrations' def close Setting.registrations_mode = 'none' |