forked from mattermost/mattermost-plugin-msteams-meetings
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MM-38103] Include professional and enterprise SKUs in license check (m…
…attermost#51) * include professional and enterprise skus in license check * update source available license * change license error message Co-authored-by: Mattermod <[email protected]>
- Loading branch information
1 parent
285052b
commit d0e5b4d
Showing
4 changed files
with
34 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package main | ||
|
||
import ( | ||
pluginapi "github.com/mattermost/mattermost-plugin-api" | ||
"github.com/mattermost/mattermost-server/v5/model" | ||
) | ||
|
||
const ( | ||
e20 = "E20" | ||
professional = "professional" | ||
enterprise = "enterprise" | ||
) | ||
|
||
func HasEnterpriseFeatures(config *model.Config, license *model.License) bool { | ||
if license != nil && (license.SkuShortName == e20 || license.SkuShortName == enterprise || license.SkuShortName == professional) { | ||
return true | ||
} | ||
|
||
return pluginapi.IsE20LicensedOrDevelopment(config, license) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters