From 1ec295f88ca99e9423ffd91019cecf802ae3dc77 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 6 Feb 2018 17:25:49 -0600 Subject: add App.License, remove utils.IsLicensed / utils.License calls (#8203) --- app/config.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/config.go') diff --git a/app/config.go b/app/config.go index 526d47a77..a2398f9e9 100644 --- a/app/config.go +++ b/app/config.go @@ -166,3 +166,11 @@ func (a *App) Desanitize(cfg *model.Config) { cfg.SqlSettings.DataSourceSearchReplicas[i] = actual.SqlSettings.DataSourceSearchReplicas[i] } } + +// License returns the currently active license or nil if the application is unlicensed. +func (a *App) License() *model.License { + if utils.IsLicensed() { + return utils.License() + } + return nil +} -- cgit v1.2.3-1-g7c22