Jelajahi Sumber

sharing: set orgId as query parameter when sharing a dashboard

to make sure an user opens the dashboard in the correct org, orgId will
always be added when sharing a dashboard. if the users current orgId
doesnt match the query parameter grafana will change it and redirect the
user.

closes #1613
bergquist 8 tahun lalu
induk
melakukan
fdb06c7c10
1 mengubah file dengan 1 tambahan dan 0 penghapusan
  1. 1 0
      public/app/features/dashboard/shareModalCtrl.js

+ 1 - 0
public/app/features/dashboard/shareModalCtrl.js

@@ -51,6 +51,7 @@ function (angular, _, $, moment, require, config) {
       var range = timeSrv.timeRange();
       var range = timeSrv.timeRange();
       params.from = range.from.valueOf();
       params.from = range.from.valueOf();
       params.to = range.to.valueOf();
       params.to = range.to.valueOf();
+      params.orgId = config.bootData.user.orgId;
 
 
       if ($scope.options.includeTemplateVars) {
       if ($scope.options.includeTemplateVars) {
         templateSrv.fillVariableValuesForUrl(params);
         templateSrv.fillVariableValuesForUrl(params);