* make sure that user permission cache is cleared after new dashboard and folder creation
* more test fixes
* Update pkg/services/dashboards/service/dashboard_service.go
* check identity type in SetDefaultPermissionsAfterCreate, set default permissions for service accounts
* set SA permissions for folders as well
* fix tests
* replace the usage of dashboard guardians with calling AC evaluators or checking access in middleware
* linting fixes
* fix test
* more test fixes
* remove a todo comment
* Move dashboard k8s APIs to a separate app
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
* Copy dashboard code in Dockerfile
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
* Fix conversion generation
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
* Update OpenAPI snapshot for dashboard/v0alpha1
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
---------
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
* Handle both user and service accounts when resolving identity name for dashboards and folders
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
* Refactor identity struct to store type in separate field
* Update ResolveIdentity to take string representation of typedID
* Add IsIdentityType to requester interface
* Use IsIdentityType from interface
* Remove usage of TypedID
* Remote typedID struct
* fix GetInternalID
This PR adds instrumentation for loading frontend SPA along with select methods in the dashboard service, and cleans up span handling in sqlstore.
---------
Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
This PR reduces the number of allocations made while caching permissions from the database, fixes the hierarchy of spans and adds new spans for tracing.
---------
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
* clean up error handling in postDashboard and remove UserDisplayDTO
* replace GetUserUID with GetUID and GetNamespacedUID, enforce namespace constant type
* lint fix
* lint fix
* more lint fixes
Removes legacy alerting, so long and thanks for all the fish! 🐟
---------
Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
Co-authored-by: Sonia Aguilar <soniaAguilarPeiron@users.noreply.github.com>
Co-authored-by: Armand Grillet <armandgrillet@users.noreply.github.com>
Co-authored-by: William Wernert <rwwiv@users.noreply.github.com>
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
* change where folder checks are done for dash creation/updates
* add test for folder not being found
* test fixes
* more test fixes
* add nlint directive to where folder IDs are used
* fix bad merge
* fix test
* Dashboards: Add integration tests for creating a dashboard
* Fix creating dashboard under folder using deprecated API
* Update swagger response
* Fix comments