grafana/pkg/models
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
..
address.go feat(organization): added update org address to http api and to org details settings view, closes #2672 2015-09-08 14:22:44 +02:00
alert_notifications.go Encryption: Refactor securejsondata.SecureJsonData to stop relying on global functions (#38865) 2021-10-07 17:33:50 +03:00
alert_test.go Chore: Rewrite models alert test to standard library (#30021) 2021-01-01 13:18:47 +01:00
alert.go Refactor: Change sqlstore.inTransaction to SQLStore.WithTransactionalDBSession in alert files (#43815) 2022-01-19 19:25:52 +00:00
apikey.go Accesscontrol: Remove service account creation code from addapikey (#43900) 2022-01-12 15:18:57 +01:00
context_test.go Chore: replace macaron with web package (#40136) 2021-10-11 14:30:59 +02:00
context.go Application: Make error-template title configurable (#40310) 2021-10-13 08:35:01 +02:00
dashboard_acl_test.go Chore: Rewrite models dashboard acl test to standard library (#30022) 2021-01-01 13:22:48 +01:00
dashboard_acl.go Forbid creation of dashboard permissions with both a user and a team (#40104) 2021-10-13 12:16:58 -06:00
dashboard_snapshot.go Chore: Refactor securedata to remove global encryption calls from dashboard snapshots (#38714) 2021-09-01 13:05:15 +02:00
dashboard_version.go Chore: Fix staticcheck issues (#28860) 2020-11-05 13:07:06 +01:00
dashboards_test.go Chore: Rewrite models dashboards test to standard library (#30023) 2021-01-01 13:29:40 +01:00
dashboards.go API: prevent provisioned dashboard from being updated (#41894) 2021-12-17 10:31:52 -05:00
datasource.go Access control: Refactor managed permission system to create api and frontend components (#42540) 2021-12-20 09:52:24 +01:00
folders.go Folder API: optionally force deleting Grafana 8 alerts when deleting a folder (or error) (#36427) 2021-07-22 12:27:13 +03:00
health.go feat: added api health endpoint that does not require auth and never creates sessions, returns db status as well. #3302 2017-04-25 17:17:45 +02:00
helpflags.go Chore: Remove unused Go code (#28852) 2020-11-17 11:51:31 +01:00
jwt.go Migrate to Wire for dependency injection (#32289) 2021-08-25 15:11:22 +02:00
libraryelements.go LibraryElements: Creates usage stats for panels and variables (#34476) 2021-05-24 06:11:01 +02:00
licensing.go FeatureFlags: Revert managing feature flags outside of settings.Cfg (#44382) 2022-01-24 16:08:05 +01:00
live.go Live: proxy subscribe data for subscribe and runstream plugin calls (#42824) 2021-12-14 20:12:00 +03:00
login_attempt.go login: uses epochs for login throtting. 2018-02-16 17:25:46 +01:00
models.go Okta OAuth provider (team sync support) (#22972) 2020-04-02 17:35:48 +03:00
notifications.go Email: Allow configuration of content types for email notifications (#34530) 2021-07-19 13:31:51 +03:00
org_user.go ServiceAccounts: Add detail view of service account (#44164) 2022-01-19 10:23:46 +01:00
org.go Chore: Fix staticcheck issues (#28860) 2020-11-05 13:07:06 +01:00
playlist.go Chore: Remove unused Go code (#28852) 2020-11-17 11:51:31 +01:00
plugin_settings.go Encryption: Refactor securejsondata.SecureJsonData to stop relying on global functions (#38865) 2021-10-07 17:33:50 +03:00
preferences.go Dashboard: Add week start option to global and dashboard preferences (#40010) 2021-10-18 10:27:14 -03:00
quotas.go Alerting: Remove ngalert feature toggle and introduce two new settings for enabling Grafana 8 alerts and disabling them for specific organisations (#38746) 2021-09-29 16:16:40 +02:00
search_user_filter.go Create search filters by interface (#39843) 2021-10-07 16:06:16 +02:00
shorturl.go Short URL: Cleanup unvisited/stale short URLs (#28867) 2020-11-09 18:08:16 +01:00
star.go Chore: Fix staticcheck issues (#28860) 2020-11-05 13:07:06 +01:00
stats.go Usage stats: Count API keys (#42883) 2021-12-22 17:37:45 +01:00
tags_test.go Chore: Rewrite models tags test to standard library (#30041) 2021-01-05 17:20:41 +01:00
tags.go Create annotations (#8197) 2017-10-07 10:31:39 +02:00
team_member.go AccessControl: Implement teams resource service (#43951) 2022-01-26 14:48:41 +00:00
team.go Add an option to hide certain users in the UI (#28942) 2020-11-24 12:10:32 +01:00
temp_user.go Users: Expire old user invites (#27361) 2020-10-13 12:30:09 +02:00
user_auth.go OAuth: persisting the id token (#42938) 2021-12-14 15:22:10 +01:00
user_token.go Migrate to Wire for dependency injection (#32289) 2021-08-25 15:11:22 +02:00
user.go AccessControl: Present user edit actions according to AC metadata (#43602) 2022-01-05 09:59:17 +01:00
validations.go Plugins: Requests validator (#30445) 2021-02-03 20:47:45 +01:00