mirror of
https://github.com/grafana/grafana.git
synced 2025-02-14 01:23:32 -06:00
use canMakeEditable
This commit is contained in:
parent
fe301142ba
commit
87c9c47579
@ -674,7 +674,7 @@ function graphDirective(timeSrv, popoverSrv, contextSrv) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((ranges.ctrlKey || ranges.metaKey) && contextSrv.isEditor) {
|
||||
if ((ranges.ctrlKey || ranges.metaKey) && (dashboard.meta.canEdit || dashboard.meta.canMakeEditable)) {
|
||||
// Add annotation
|
||||
setTimeout(() => {
|
||||
eventManager.updateTime(ranges.xaxis);
|
||||
@ -695,7 +695,7 @@ function graphDirective(timeSrv, popoverSrv, contextSrv) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((pos.ctrlKey || pos.metaKey) && contextSrv.isEditor) {
|
||||
if ((pos.ctrlKey || pos.metaKey) && (dashboard.meta.canEdit || dashboard.meta.canMakeEditable)) {
|
||||
// Skip if range selected (added in "plotselected" event handler)
|
||||
let isRangeSelection = pos.x !== pos.x1;
|
||||
if (!isRangeSelection) {
|
||||
|
Loading…
Reference in New Issue
Block a user