feat(dashboard_rbac): dashboard_view access enforcement (#12875)

* test: dashboard_view_test failing

* test: tests works first time

* fix: pre-commit and  some refactoring

* fix:  after CR

* fix:  replace not_published with draft

* fix:  after CR

* fix: pre-commit fixes

* fix: pre-commit and lint fixes

* fix: remove unused

* fix: remove unused import

* fix: wrap the decorator to not block others

* chore: reuse dashboard from decorator into function
This commit is contained in:
Amit Miran
2021-02-04 20:23:53 +02:00
committed by GitHub
parent 9982fdebd8
commit b472d1841c
6 changed files with 299 additions and 114 deletions

View File

@@ -75,3 +75,7 @@ class DashboardForbiddenError(ForbiddenError):
class DashboardImportError(ImportFailedError):
message = _("Import dashboard failed for an unknown reason")
class DashboardAccessDeniedError(ForbiddenError):
message = _("You don't have access to this dashboard.")