Public Dashboards: Disable email-sharing when there is no license (#80887)

* PublicDashboards: Disable email-shared dashboards when feature is disabled

* fix pubdash creation when it was email-shared

* add feature name const in OSS

* update doc

* Update service.go

* fix test & linter

* fix test

* Update query_test.go

* update tests

* fix imports

* fix doc linter issues

* Update docs/sources/administration/enterprise-licensing/_index.md

* fix after merge
This commit is contained in:
Agnès Toulet
2024-02-22 09:34:14 +01:00
committed by GitHub
parent cfcf03bf7a
commit 8d68159b52
11 changed files with 174 additions and 298 deletions

View File

@@ -98,7 +98,7 @@ func (hs *HTTPServer) GetDashboard(c *contextmodel.ReqContext) response.Response
return response.Error(http.StatusInternalServerError, "Error while retrieving public dashboards", err)
}
if publicDashboard != nil {
if publicDashboard != nil && (hs.License.FeatureEnabled(publicdashboardModels.FeaturePublicDashboardsEmailSharing) || publicDashboard.Share != publicdashboardModels.EmailShareType) {
publicDashboardEnabled = publicDashboard.IsEnabled
}
}