MM-47936: Removes CustomGroups feature flag. (#21739)

* MM-47936: Removes CustomGroups feature flag.

* MM-47936: Updates godoc.
Этот коммит содержится в:
Martin Kraft
2022-11-28 13:49:51 -05:00
коммит произвёл GitHub
родитель 6965585aa8
Коммит 62d9218011
3 изменённых файлов: 4 добавлений и 17 удалений

Просмотреть файл

@@ -980,7 +980,7 @@ func getGroups(c *Context, w http.ResponseWriter, r *http.Request) {
}
// If they don't specify a source and custom groups are disabled, ensure they only get ldap groups in the response
if !c.App.Config().FeatureFlags.CustomGroups || !*c.App.Config().ServiceSettings.EnableCustomGroups {
if !*c.App.Config().ServiceSettings.EnableCustomGroups {
source = model.GroupSourceLdap
}
@@ -1328,8 +1328,6 @@ func deleteGroupMembers(c *Context, w http.ResponseWriter, r *http.Request) {
//
// err := licensedAndConfiguredForGroupBySource(c.App, group.Source)
// err.Where = "Api4.getGroup"
//
// Temporarily, this function also checks for the CustomGroups feature flag.
func licensedAndConfiguredForGroupBySource(app app.AppIface, source model.GroupSource) *model.AppError {
lic := app.Srv().License()
@@ -1345,7 +1343,7 @@ func licensedAndConfiguredForGroupBySource(app app.AppIface, source model.GroupS
return model.NewAppError("", "api.custom_groups.license_error", nil, "", http.StatusBadRequest)
}
if source == model.GroupSourceCustom && (!app.Config().FeatureFlags.CustomGroups || !*app.Config().ServiceSettings.EnableCustomGroups) {
if source == model.GroupSourceCustom && !*app.Config().ServiceSettings.EnableCustomGroups {
return model.NewAppError("", "api.custom_groups.feature_disabled", nil, "", http.StatusBadRequest)
}