add App.License, remove utils.IsLicensed / utils.License calls (#8203)
Этот коммит содержится в:
@@ -13,7 +13,6 @@ import (
|
||||
"github.com/gorilla/mux"
|
||||
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
)
|
||||
|
||||
func (api *API) InitTeam() {
|
||||
@@ -117,7 +116,7 @@ func getAll(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
func inviteMembers(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
invites := model.InvitesFromJson(r.Body)
|
||||
|
||||
if utils.IsLicensed() && !c.App.SessionHasPermissionToTeam(c.Session, c.TeamId, model.PERMISSION_INVITE_USER) {
|
||||
if c.App.License() != nil && !c.App.SessionHasPermissionToTeam(c.Session, c.TeamId, model.PERMISSION_INVITE_USER) {
|
||||
errorId := ""
|
||||
if *c.App.Config().TeamSettings.RestrictTeamInvite == model.PERMISSIONS_SYSTEM_ADMIN {
|
||||
errorId = "api.team.invite_members.restricted_system_admin.app_error"
|
||||
|
||||
Ссылка в новой задаче
Block a user