grafana/pkg/services
Gabriel MABILLE d4f682190f
AccessControl: Implement teams resource service (#43951)
* AccessControl: cover team permissions

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>

* Add background service as a consumer to resource_services

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>

* Define actions in roles.go

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>

* Remove action from accesscontrol model

 Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>

* As suggested by kalle

* move some changes from branch to the skeleton PR

* Add background service as a consumer to resource_services

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>

* moving resourceservice to the main wire file pt2

* move team related actions so that they can be reused

* PR feedback

* fix

* typo

* Access Control: adding hooks for team member endpoints (#43991)

* AccessControl: cover team permissions

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>

* Add background service as a consumer to resource_services

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>

* Define actions in roles.go

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>

* Remove action from accesscontrol model

 Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>

* As suggested by kalle

* add access control to list and add team member endpoint, and hooks for adding team members

* member permission type is 0

* add ID scope for team permission checks

* add more team actions, use Member for member permission name

* protect team member update endpoint with FGAC permissions

* update SQL functions for teams and the corresponding tests

* also protect team member removal endpoint with FGAC permissions and add a hook to permission service

* a few small fixes, provide team permission service to test setup

* AccessControl: cover team permissions

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>

* Add background service as a consumer to resource_services

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>

* Define actions in roles.go

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>

* Remove action from accesscontrol model

 Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>

* As suggested by kalle

* move some changes from branch to the skeleton PR

* remove resource services from wireexts

* remove unneeded actions

* linting fix

* remove comments

* feedback fixes

* feedback

* simplifying

* remove team member within the same transaction

* fix a mistake with the error

* call the correct sql fction

* linting

* Access control: tests for team member endpoints (#44177)

* tests for team member endpoints

* clean up and fix the tests

* fixing tests take 2

* don't import enterprise test license

* don't import enterprise test license

* remove unused variable

Co-authored-by: gamab <gabi.mabs@gmail.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
2022-01-26 14:48:41 +00:00
..
accesscontrol AccessControl: Implement teams resource service (#43951) 2022-01-26 14:48:41 +00:00
alerting Chore: Implement OpenTelemtry in Grafana (#42674) 2022-01-20 11:10:12 +01:00
annotations Chore: Replace util.DynMap with structs (#36332) 2021-07-01 10:23:33 +02:00
auth Chore: Remove context.TODO() (#43409) 2021-12-22 11:02:42 +01:00
cleanup Rename DispatchCtx to Dispatch (#43563) 2021-12-28 17:36:22 +01:00
contexthandler Chore: Implement OpenTelemtry in Grafana (#42674) 2022-01-20 11:10:12 +01:00
dashboards Rename DispatchCtx to Dispatch (#43563) 2021-12-28 17:36:22 +01:00
dashboardsnapshots Refactor: Change sqlstore.inTransaction to SQLStore.WithTransactional… (#43772) 2022-01-07 17:50:59 +01:00
datasourceproxy Chore: Implement OpenTelemtry in Grafana (#42674) 2022-01-20 11:10:12 +01:00
datasources Datasources: Simplify the AzureCredentials structure in datasource config (#39209) 2022-01-25 14:23:32 +01:00
encryption Replace encryption.Service usages by secrets.Service (#41625) 2021-11-12 12:16:39 +01:00
guardian Rename DispatchCtx to Dispatch (#43563) 2021-12-28 17:36:22 +01:00
hooks Migrate to Wire for dependency injection (#32289) 2021-08-25 15:11:22 +02:00
kmsproviders Usage Stats: Add metrics to count enabled kms providers per kind (#43640) 2022-01-07 13:52:28 +01:00
ldap LDAP: Search all DNs for users (#38891) 2021-09-14 10:49:37 +02:00
libraryelements Chore: Implement OpenTelemtry in Grafana (#42674) 2022-01-20 11:10:12 +01:00
librarypanels Chore: Implement OpenTelemtry in Grafana (#42674) 2022-01-20 11:10:12 +01:00
licensing switch to using featureEnabled for enterprise features (#41559) 2022-01-07 15:11:23 -05:00
live FeatureFlags: Revert managing feature flags outside of settings.Cfg (#44382) 2022-01-24 16:08:05 +01:00
login GetUserInfo: Return an error if no user was found (#44169) 2022-01-18 17:03:16 +01:00
multildap Chore: Replace goconvey in multildap package (#40681) 2021-10-20 15:07:37 +02:00
ngalert Alerting: recognize Cortex datasources correctly in the frontend (#44316) 2022-01-21 15:44:11 +01:00
notifications Alerting: Add abstraction layer and testing hooks in front of SMTP dialer (#43875) 2022-01-13 15:19:15 -06:00
oauthtoken Rename DispatchCtx to Dispatch (#43563) 2021-12-28 17:36:22 +01:00
pluginsettings Rename AddHandlerCtx to AddHandler (#43557) 2021-12-28 16:08:07 +01:00
provisioning Provisioning: Fix duplicate validation when multiple organizations have been configured (#44151) 2022-01-26 11:33:31 +01:00
query Propagate all headers (#43812) 2022-01-07 12:45:26 -07:00
quota Rename DispatchCtx to Dispatch (#43563) 2021-12-28 17:36:22 +01:00
rendering Crawler: use existing render service to generate dashboard thumbnails (#43515) 2022-01-10 08:21:35 -08:00
schemaloader FeatureFlags: Revert managing feature flags outside of settings.Cfg (#44382) 2022-01-24 16:08:05 +01:00
search Rename DispatchCtx to Dispatch (#43563) 2021-12-28 17:36:22 +01:00
searchusers Auth: implement auto_sign_up for auth.jwt (#43502) 2022-01-13 17:15:22 +01:00
secrets FeatureFlags: Revert managing feature flags outside of settings.Cfg (#44382) 2022-01-24 16:08:05 +01:00
serviceaccounts FeatureFlags: Revert managing feature flags outside of settings.Cfg (#44382) 2022-01-24 16:08:05 +01:00
shorturls Migrate to Wire for dependency injection (#32289) 2021-08-25 15:11:22 +02:00
sqlstore AccessControl: Implement teams resource service (#43951) 2022-01-26 14:48:41 +00:00
teamguardian Chore: Remove bus from team (#44218) 2022-01-24 11:52:35 +01:00
thumbs FeatureFlags: Revert managing feature flags outside of settings.Cfg (#44382) 2022-01-24 16:08:05 +01:00
updatechecker Plugins: Refactor Plugin Management (#40477) 2021-11-01 10:53:33 +01:00
validations Migrate to Wire for dependency injection (#32289) 2021-08-25 15:11:22 +02:00