idafurjes
7936c4c522
Rename AddHandlerCtx to AddHandler ( #43557 )
2021-12-28 16:08:07 +01:00
idafurjes
b8852ef6a3
Chore: Remove context.TODO() ( #43409 )
...
* Remove context.TODO() from services
* Fix live test
* Remove context.TODO
2021-12-22 11:02:42 +01:00
Marcus Efraimsson
518a0d0458
Chore: Propagate context for dashboard guardian ( #39201 )
...
Require guardian.New to take context.Context as first argument.
Migrates the GetDashboardAclInfoListQuery to be dispatched using context.
Ref #36734
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
Co-authored-by: sam boyer <sam.boyer@grafana.com>
2021-09-23 17:43:32 +02:00
Arve Knudsen
87c3a2b790
PluginManager: Make Plugins, Renderer and DataSources non-global ( #31866 )
...
* PluginManager: Make Plugins and DataSources non-global
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix integration tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Replace outdated command
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* DashboardService: Ensure it gets constructed with necessary parameters
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix build
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* DashboardService: Ensure it gets constructed with necessary parameters
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Remove dead code
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix test
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix test
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Remove FocusConvey
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix test
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Remove dead code
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Undo interface changes
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Backend: Move tsdbifaces.RequestHandler to plugins.DataRequestHandler
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Rename to DataSourceCount
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Consolidate dashboard interfaces into one
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix test
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix dashboard integration tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-03-17 16:06:10 +01:00
Arve Knudsen
52c154a221
Backend: Rename variables for style conformance ( #29097 )
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-17 17:09:14 +01:00
Arve Knudsen
41d432b5ae
Chore: Enable whitespace linter ( #25903 )
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-06 20:17:28 +02:00
Carl Bergquist
f9962eabff
chore: avoid aliasing imports in services ( #22499 )
2020-02-29 13:35:15 +01:00
Tom Petr
2d6b33ab61
sqlstore: use column name in order by ( #16583 )
...
Use column name in ORDER BY in GetDashboardAclInfoList().
2019-04-24 16:05:35 +02:00
Marcus Efraimsson
d86ed679b1
return inherited property for permissions
2018-04-23 09:23:14 +02:00
Carl Bergquist
8367199a2d
Merge pull request #11613 from knweiss/gosimple
...
Code simplification (gosimple)
2018-04-17 22:40:40 +02:00
Karsten Weiss
be2d635078
Simplify error returns (gosimple)
...
This fixes:
pkg/api/avatar/avatar.go:261:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/log/file.go:102:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/metrics/graphitebridge/graphite.go:298:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/provisioning/provisioning.go:23:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/alert_notification.go:27:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/alert_notification.go:27:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/annotation.go:105:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/annotation.go:105:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/dashboard.go:351:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/dashboard.go:435:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/dashboard_acl.go:38:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/dashboard_acl.go:38:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/stats.go:22:2: 'if err != nil { return err }; return err' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/team.go:213:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/user.go:256:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/user.go:256:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/user.go:274:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/user.go:274:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/user.go:482:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/user.go:482:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
2018-04-16 21:04:57 +02:00
Torkel Ödegaard
fcaa8227a6
Dashboard acl query fixes ( #10909 )
...
* initial fixes for dashboard permission acl list query, fixes #10864
* permissions: refactoring of acl api and query
2018-02-14 15:04:26 +01:00
Torkel Ödegaard
73eaba076e
wip: dashboard acl ux2, #10747
2018-02-14 15:03:22 +01:00
Torkel Ödegaard
ec6f0f94b8
permissions: refactoring of acl api and query
2018-02-14 14:31:20 +01:00
Torkel Ödegaard
db89ac4134
initial fixes for dashboard permission acl list query, fixes #10864
2018-02-14 11:50:58 +01:00
Daniel Lee
2d1bd270fb
Stale permissions ( #10768 )
...
* dashfolders: hide permissions in settings if folder has changed
and the dashboard has not been saved yet. Otherwise the use will
see stale permissions from the original folder.
* dashfolders: return folder url for inherited permissions
2018-02-05 14:28:24 +01:00
Daniel Lee
7e2e57c306
dashfolders: fixes #10671 . Allow Editors default access to Root.
...
Editors should be able to create dashboards in root and should be
able to create folders. They cannot administrate permissions though
and these dashboards and folders will get the default permissions.
2018-01-31 16:43:21 +01:00
Marcus Efraimsson
d36fd66dba
dashfolder: fix for sqlite test
2018-01-24 11:43:08 +01:00
Daniel Lee
9d2a667e8b
dashfolder: fix for mysql test
2018-01-24 11:19:26 +01:00
Marcus Efraimsson
df3655dd4a
db: fix postgres regression when comparing boolean columns/values ( #10303 )
...
Use the dialect specific BooleanStr when comparing boolean columns/values.
Fixes #10300
2017-12-20 12:15:49 +01:00
Alexander Zobnin
26281dd9d8
refactor: format files by gofmt
2017-12-11 19:46:05 +03:00
Alexander Zobnin
d8612380e9
refactor: rename User Groups to Teams
2017-12-08 18:25:45 +03:00
Daniel Lee
ebcbcdc27a
dashfolders: inherited permissions for dashboards
...
Allow duplicate permissions if the original is an
inherited permission from a parent folder.
If a dashboard has permissions but the parent folder
does not, return the default permissions for the
editor and view role combined with the permissions
for the child dashboard.
2017-06-24 03:50:22 +02:00
Torkel Ödegaard
fc69d59cae
dashboard folder search fix
2017-06-23 16:00:26 -04:00
Torkel Ödegaard
9c6c8c0f3f
acl fixes
2017-06-22 17:10:43 -04:00
Torkel Ödegaard
a82b25eb79
acl: more acl work
2017-06-22 15:16:41 -04:00
Torkel Ödegaard
659a59107e
dashboard acl stuff
2017-06-21 19:23:24 -04:00
Torkel Ödegaard
2257c1f874
dashboard acl work
2017-06-21 19:02:03 -04:00
Torkel Ödegaard
fcc8557dbb
dashboard acl work
2017-06-21 14:11:16 -04:00
Torkel Ödegaard
212a66ae5f
Merge branch 'dashboard_folders' of github.com:grafana/grafana into dashboard_folders
2017-06-19 18:55:34 -04:00
Daniel Lee
812112f2f6
WIP: fix acl route
2017-06-20 00:34:25 +02:00
Torkel Ödegaard
e290015887
refactoring: renaming
2017-06-19 18:19:58 -04:00
Torkel Ödegaard
aaf2a897b0
folders: changed api urls for dashboard acls
2017-06-19 18:11:30 -04:00
Torkel Ödegaard
c4a1803060
refactoring more renaming
2017-06-19 17:30:54 -04:00
Torkel Ödegaard
e0b9ba7554
refactoring renaming dashboard folder operations
2017-06-19 17:15:25 -04:00
Torkel Ödegaard
d6341162cb
refactoring dashboad folder acl checks
2017-06-19 11:54:37 -04:00
Torkel Ödegaard
b494fd7689
dashboard folders acl work
2017-06-19 11:03:54 -04:00
Torkel Ödegaard
cbbbccf12a
refactoring dashoard folder guardian
2017-06-17 18:24:38 -04:00
Torkel Ödegaard
3fe031d25d
refactoring: Dashboard guardian
2017-06-16 21:25:24 -04:00
Daniel Lee
699f9095e2
WIP: remove permissions when deleting global user
2017-06-14 23:45:30 +02:00
Daniel Lee
9eccb4e79f
WIP: API - add dash permission
2017-06-12 15:49:09 +02:00
Daniel Lee
2097ed0bb8
WIP: Permission Type as string in permission query
2017-06-12 15:49:09 +02:00
Daniel Lee
b4576edc90
WIP: fix after upstream sqlstore refactoring
2017-06-12 15:49:09 +02:00
Daniel Lee
f1e1da39e3
WIP: get Dashboard Permissions
...
The guardian class checks if the user is allowed to get the
permissions for a dashboard.
2017-06-12 15:49:09 +02:00
Daniel Lee
13314f23ba
WIP: Can remove dashboard permission - sql
2017-06-12 15:49:09 +02:00
Daniel Lee
97c13b77bf
WIP: Add or update Dashboard ACL
...
SQL Integration Tests for the guardian class too.
2017-06-12 15:49:09 +02:00