MM-10606: License feature flag for custom schemes. (#8804)
* MM-10606: Add new field to license for custom schemes. * Add feature flag to license check for Schemes.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
a09dc68e1d
Коммит
463065c8ba
@@ -26,7 +26,7 @@ func createScheme(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
if c.App.License() == nil {
|
||||
if c.App.License() == nil || !*c.App.License().Features.CustomPermissionsSchemes {
|
||||
c.Err = model.NewAppError("Api4.CreateScheme", "api.scheme.create_scheme.license.error", nil, "", http.StatusNotImplemented)
|
||||
return
|
||||
}
|
||||
@@ -161,7 +161,7 @@ func patchScheme(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
if c.App.License() == nil {
|
||||
if c.App.License() == nil || !*c.App.License().Features.CustomPermissionsSchemes {
|
||||
c.Err = model.NewAppError("Api4.PatchScheme", "api.scheme.patch_scheme.license.error", nil, "", http.StatusNotImplemented)
|
||||
return
|
||||
}
|
||||
@@ -192,7 +192,7 @@ func deleteScheme(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
if c.App.License() == nil {
|
||||
if c.App.License() == nil || !*c.App.License().Features.CustomPermissionsSchemes {
|
||||
c.Err = model.NewAppError("Api4.DeleteScheme", "api.scheme.delete_scheme.license.error", nil, "", http.StatusNotImplemented)
|
||||
return
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user