3
0
mirror of https://github.com/grafana/grafana.git synced 2025-02-25 18:55:37 -06:00
grafana/pkg/services/dashboards/manager
Karl Persson a5e4a533fa
Access control: use uid for dashboard and folder scopes ()
* use uid:s for folder and dashboard permissions

* evaluate folder and dashboard permissions based on uids

* add dashboard.uid to accept list

* Check for exact suffix

* Check parent folder on create

* update test

* drop dashboard:create actions with dashboard scope

* fix typo

* AccessControl: test id 0 scope conversion

* AccessControl: store only parent folder UID

* AccessControl: extract general as a constant

* FolderServices: Prevent creation of a folder uid'd general

* FolderServices: Test folder creation prevention

* Update pkg/services/guardian/accesscontrol_guardian.go

* FolderServices: fix mock call expect

* FolderServices: remove uneeded mocks

Co-authored-by: jguer <joao.guerreiro@grafana.com>
2022-03-30 15:14:26 +02:00
..
dashboard_service_integration_test.go Chore: Remove bus.Dispatch from guardian package () 2022-03-21 10:49:49 +01:00
dashboard_service_test.go Chore: Remove bus from dashboard service () 2022-03-22 14:36:50 +01:00
dashboard_service.go Access control: use uid for dashboard and folder scopes () 2022-03-30 15:14:26 +02:00
folder_service_test.go Access control: use uid for dashboard and folder scopes () 2022-03-30 15:14:26 +02:00
folder_service.go Access control: use uid for dashboard and folder scopes () 2022-03-30 15:14:26 +02:00