[MM-27535] User invite limits for MM Cloud (#15197)
* Add a config for MM User Limit * Adding graceful errors for if an administrator invites people passed their user limit * Including changed vendor files * Adding unit test * Fix a bug * Push up working tests (Thanks Joram) * Add more cases, clean up logs in code * One more case * Refactoring based on PR comments * Updating i18n * Some changes based on PR review * Remove a comment * Bring back some translations that were somehow removed Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
@@ -861,6 +861,7 @@ type ExperimentalSettings struct {
|
||||
EnableClickToReply *bool `restricted:"true"`
|
||||
LinkMetadataTimeoutMilliseconds *int64 `restricted:"true"`
|
||||
RestrictSystemAdmin *bool `restricted:"true"`
|
||||
CloudUserLimit *int64 `restricted:"true"`
|
||||
UseNewSAMLLibrary *bool
|
||||
}
|
||||
|
||||
@@ -884,6 +885,11 @@ func (s *ExperimentalSettings) SetDefaults() {
|
||||
if s.RestrictSystemAdmin == nil {
|
||||
s.RestrictSystemAdmin = NewBool(false)
|
||||
}
|
||||
|
||||
if s.CloudUserLimit == nil {
|
||||
// User limit 0 is treated as no limit
|
||||
s.CloudUserLimit = NewInt64(0)
|
||||
}
|
||||
if s.UseNewSAMLLibrary == nil {
|
||||
s.UseNewSAMLLibrary = NewBool(false)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user