9 Commits

Author SHA1 Message Date
8765c48389 Alerting: Remove legacy alerting (#83671)
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>
2024-03-14 15:36:35 +01:00
c5c34ed95e RBAC: Rewrite provisioning rbac tests (#61752)
* RBAC: Rewrite rbac provisioning api tests
2023-01-19 13:49:57 +01:00
d9cace4dca Alerting: Add file provisioning for contact points (#51924) 2022-08-01 18:17:42 +02:00
41790083d2 Alerting: Add file provisioning for alert rules (#51635) 2022-07-14 23:53:13 +02:00
44ffbfd6aa RBAC: Refactor GetUserPermissions to use []accesscontrol.Permission (#50683)
* Return slice of permissions instead of slice of pointers for permissions
2022-06-14 10:17:48 +02:00
47f6bb3583 Chore: Add context to org (#40685)
* Add context to org

* Rebase

* Fix rebase
2021-11-03 11:31:56 +01:00
e8e1a0b50b Revert "Revert "AccessControl: Implement a way to register fixed roles (#35641)" (#37397)" (#37535)
This reverts commit 55efeb0c02ef5261eb8a75ea27adfdc6194de7ad.
2021-08-04 14:44:37 +02:00
55efeb0c02 Revert "AccessControl: Implement a way to register fixed roles (#35641)" (#37397)
This reverts commit 88c11f1cc0a7d0cfc99fafe4ffa64b54a78814e8.
2021-07-30 13:58:49 +02:00
88c11f1cc0 AccessControl: Implement a way to register fixed roles (#35641)
* AccessControl: Implement a way to register fixed roles

* Add context to register func

* Use FixedRoleGrantsMap instead of FixedRoleGrants

* Removed FixedRoles map to sync.map


* Wrote test for accesscontrol and provisioning

* Use mutexes+map instead of sync maps

* Create a sync map struct out of a Map and a Mutex

* Create a sync map struct for grants as well

* Validate builtin roles

* Make validation public to access control

* Handle errors consistently with what seeder does

* Keep errors consistant amongst accesscontrol impl

* Handle registration error

* Reverse the registration direction thanks to a RoleRegistrant interface

* Removed sync map in favor for simple maps since registration now happens during init

* Work on the Registrant interface

* Remove the Register Role from the interface to have services returning their registrations instead

* Adding context to RegisterRegistrantsRoles and update descriptions

* little bit of cosmetics

* Making sure provisioning is ran after role registration

* test for role registration

* Change the accesscontrol interface to use a variadic

* check if accesscontrol is enabled

* Add a new test for RegisterFixedRoles and fix assign which was buggy

* Moved RegistrationList def to roles.go

* Change provisioning role's description

* Better comment on RegisterFixedRoles

* Correct comment on ValidateFixedRole

* Simplify helper func to removeRoleHelper

* Add log to saveFixedRole and assignFixedRole

Co-authored-by: Vardan Torosyan <vardants@gmail.com>
Co-authored-by: Jeremy Price <Jeremy.price@grafana.com>
2021-07-30 09:52:09 +02:00