Commit Graph

27 Commits

Author SHA1 Message Date
Serge Zaitsev 643c7fa0cb
Chore: update all +build statements (#38782) 2021-09-01 17:38:56 +03: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
Emil Hessman 3519330166
Chore: Rewrite test helpers from GoConvey to stdlib (#28919) 2020-11-11 21:33:32 +01:00
Sofia Papagiannaki 4937f0daab
SQLStore: Run tests as integration tests (#28265)
* sqlstore: Run tests as integration tests

* Truncate database instead of re-creating it on each test

* Fix test description

See https://github.com/grafana/grafana/pull/12129

* Fix lint issues

* Fix postgres dialect after review suggestion

* Rename and document functions after review suggestion

* Add periods

* Fix auto-increment value for mysql dialect

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2020-10-16 10:46:14 +03:00
Carl Bergquist f9962eabff
chore: avoid aliasing imports in services (#22499) 2020-02-29 13:35:15 +01:00
Mario Trangoni 6eb00000fe pkg/services: fix ineffassign issues 2018-04-23 19:28:54 +02:00
Marcus Efraimsson d86ed679b1
return inherited property for permissions 2018-04-23 09:23:14 +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
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
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 9c6c8c0f3f acl fixes 2017-06-22 17:10:43 -04:00
Torkel Ödegaard fcc8557dbb dashboard acl work 2017-06-21 14:11:16 -04: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 04da97bffb dashboard_folders refactoring 2017-06-19 15:37:22 -04:00
Torkel Ödegaard d6341162cb refactoring dashboad folder acl checks 2017-06-19 11:54:37 -04:00
Torkel Ödegaard cbbbccf12a refactoring dashoard folder guardian 2017-06-17 18:24:38 -04:00
Daniel Lee 699f9095e2 WIP: remove permissions when deleting global user 2017-06-14 23:45:30 +02:00
Daniel Lee 2097ed0bb8 WIP: Permission Type as string in permission query 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