Просмотр исходного кода

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 лет назад
Родитель
Сommit
fdb06c7c10
1 измененных файлов с 1 добавлено и 0 удалено
  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();
       params.from = range.from.valueOf();
       params.to = range.to.valueOf();
+      params.orgId = config.bootData.user.orgId;
 
       if ($scope.options.includeTemplateVars) {
         templateSrv.fillVariableValuesForUrl(params);