mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Don't allow users to immediately reinvite (#15722)
- Limit bulk re-invite to 1 time per day - Move bulk invite by csv behind a site setting (hidden by default) - Bump invite expiry from 30 -> 90 days ## Updates to rate_limiter When limiting reinvites I found that **staff** are never limited in any way. So I updated the **rate_limiter** model to allow for a few things: - add an optional param of `staff_limit`, which (when included and passed values, and the user passes `.staff?`) will override the default `max` & `secs` values and apply them to the user. - in the case you **do** pass values to `staff_limit` but the user **does not** pass `staff?` the standard `max` & `secs` values will be applied to the user. This should give us enough flexibility to 1. continue to apply a strict rate limit to a standard user 2. but also apply a secondary (less strict) limit to staff
This commit is contained in:
@@ -1465,6 +1465,7 @@ en:
|
||||
watched_word_regexp_error: "The regular expression for '%{action}' watched words is invalid. Please check your <a href='%{base_path}/admin/customize/watched_words'>Watched Word settings</a>, or disable the 'watched words regular expressions' site setting."
|
||||
|
||||
site_settings:
|
||||
allow_bulk_invite: "Allow bulk invites by uploading a CSV file"
|
||||
disabled: "disabled"
|
||||
display_local_time_in_user_card: "Display the local time based on a user's timezone when their user card is opened."
|
||||
censored_words: "Words that will be automatically replaced with ■■■■"
|
||||
|
||||
@@ -584,7 +584,7 @@ users:
|
||||
client: true
|
||||
default: true
|
||||
invite_expiry_days:
|
||||
default: 30
|
||||
default: 90
|
||||
client: true
|
||||
max: 36500
|
||||
invites_per_page:
|
||||
@@ -2347,6 +2347,10 @@ uncategorized:
|
||||
default: false
|
||||
hidden: true
|
||||
|
||||
allow_bulk_invite:
|
||||
default: true
|
||||
client: true
|
||||
|
||||
max_bulk_invites:
|
||||
default: 50000
|
||||
hidden: true
|
||||
|
||||
Reference in New Issue
Block a user