[MM-31497] - Prevent end users from inviting people and exceeding the free tier limits (#16786)
* [MM-31497] - Prevent end users from inviting people and exceeding the free tier limits * Update error * Commit forgotten code * Chnage impl-1 * Change impl-2 * Remove test * Include tier status * Renable permissions check * Change endpoint name * Update endpoint * Update api4/cloud.go Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com> * Add test for new endpoint * Format code Co-authored-by: Mattermod <mattermod@users.noreply.github.com> Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
d489868f28
Коммит
ddd9439706
@@ -1205,7 +1205,7 @@ func inviteUsersToTeam(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
if graceful {
|
||||
cloudUserLimit := *c.App.Config().ExperimentalSettings.CloudUserLimit
|
||||
var invitesOverLimit []*model.EmailInviteWithError
|
||||
if c.App.Srv().License() != nil && *c.App.Srv().License().Features.Cloud && cloudUserLimit > 0 && c.IsSystemAdmin() {
|
||||
if c.App.Srv().License() != nil && *c.App.Srv().License().Features.Cloud && cloudUserLimit > 0 {
|
||||
subscription, subErr := c.App.Cloud().GetSubscription()
|
||||
if subErr != nil {
|
||||
c.Err = subErr
|
||||
|
||||
Ссылка в новой задаче
Block a user