summaryrefslogtreecommitdiffstats
path: root/api4/scheme.go
diff options
context:
space:
mode:
authorGeorge Goldberg <george@gberg.me>2018-05-17 16:29:31 +0100
committerGitHub <noreply@github.com>2018-05-17 16:29:31 +0100
commit463065c8ba4b4aece7fd9b7764ba917df3e73292 (patch)
tree2dfbe1dee29ce78eac853f64dde247338d44c917 /api4/scheme.go
parenta09dc68e1d99394f5d636284e0580dd17b2773b3 (diff)
downloadchat-463065c8ba4b4aece7fd9b7764ba917df3e73292.tar.gz
chat-463065c8ba4b4aece7fd9b7764ba917df3e73292.tar.bz2
chat-463065c8ba4b4aece7fd9b7764ba917df3e73292.zip
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.
Diffstat (limited to 'api4/scheme.go')
-rw-r--r--api4/scheme.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/api4/scheme.go b/api4/scheme.go
index bdfe69870..5070d1c4a 100644
--- a/api4/scheme.go
+++ b/api4/scheme.go
@@ -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
}