grafana/pkg/api
Karl Persson 2fd7031102
Access Control: Add fine-grained access control to explore (#35883)
* add fixed role for datasource read operations

* Add action for datasource explore

* add authorize middleware to explore index route

* add fgac support for explore navlink

* update hasAccessToExplore to check if accesscontrol is enable and evalute action if it is

* add getExploreRoles to evalute roles based onaccesscontrol, viewersCanEdit and default

* create function to evaluate permissions or using fallback if accesscontrol is disabled

* change hasAccess to prop and derive the value in mapStateToProps

* add test case to ensure buttons is not rendered when user does not have access

* Only hide return with changes button

* remove internal links if user does not have access to explorer

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-07-02 14:43:12 +02:00
..
avatar Backend: Migrate to using non-global configuration (#31856) 2021-03-10 12:41:29 +01:00
datasource Chore: Remove unused Go code (#28852) 2020-11-17 11:51:31 +01:00
dtos Allow white labeling loading logo (#36174) 2021-07-02 14:17:10 +02:00
frontendlogging PluginManager: Make remaining plugin state non-global (#32094) 2021-03-18 13:53:01 +01:00
pluginproxy AzureMonitor: token provider into aztokenprovider and cleanup (#36102) 2021-06-29 10:05:42 +02:00
response [Alerting] Forking LoTex ruler (#32138) 2021-03-19 10:32:13 -04:00
routing Chore: Moves common and response into separate packages (#30298) 2021-01-15 14:43:20 +01:00
static Plugins: Serve static assets directly instead of through middleware handler (#32779) 2021-04-21 15:17:23 +02:00
acl.go PluginManager: Make Plugins, Renderer and DataSources non-global (#31866) 2021-03-17 16:06:10 +01:00
admin_provisioning.go Chore: Moves common and response into separate packages (#30298) 2021-01-15 14:43:20 +01:00
admin_test.go Access Control: Add fine-grained access control to GET stats and settings handlers (#35622) 2021-06-14 17:36:48 +02:00
admin_users_test.go add context to getsignedinUser calls (#35963) 2021-06-21 07:51:33 +02:00
admin_users.go add context to getsignedinUser calls (#35963) 2021-06-21 07:51:33 +02:00
admin.go Access Control: Add fine-grained access control to GET stats and settings handlers (#35622) 2021-06-14 17:36:48 +02:00
alerting_test.go Search: add sort information in dashboard results (#30609) 2021-02-11 08:49:16 +01:00
alerting.go NGAlert: Send list of available ngalert notification channels via API (#33489) 2021-05-04 13:58:39 +02:00
annotations_test.go Annotations: Adds tags endpoint (#36199) 2021-06-30 13:42:54 +02:00
annotations.go Chore: Replace util.DynMap with structs (#36332) 2021-07-01 10:23:33 +02:00
api.go Access Control: Add fine-grained access control to explore (#35883) 2021-07-02 14:43:12 +02:00
apikey.go Return 404 when deleting non-existing API key (#33346) 2021-04-28 13:30:09 +02:00
app_routes.go PluginManager: Make remaining plugin state non-global (#32094) 2021-03-18 13:53:01 +01:00
basic_auth_test.go Chore: Use Header.Set method instead of Header.Add (#29804) 2020-12-14 15:13:01 +01:00
basic_auth.go Chore: Start harmonizing linting with plugin SDK (#25854) 2020-06-29 14:08:32 +02:00
common_test.go Access Control: Add fine-grained access control to GET stats and settings handlers (#35622) 2021-06-14 17:36:48 +02:00
dashboard_permission_test.go Instrumentation: add context.Context to the dashboard get flow. (#34955) 2021-06-15 16:08:27 +02:00
dashboard_permission.go Instrumentation: add context.Context to the dashboard get flow. (#34955) 2021-06-15 16:08:27 +02:00
dashboard_snapshot_test.go API: add ID to snapshot API responses (#29600) 2020-12-04 16:22:58 +01:00
dashboard_snapshot.go Fix key and deleteKey being ignored when creating a snapshot with external=true set (#33686) 2021-05-13 15:39:43 -07:00
dashboard_test.go Live: rely on app url for origin check (#35983) 2021-06-23 19:51:03 +03:00
dashboard.go add context to getsignedinUser calls (#35963) 2021-06-21 07:51:33 +02:00
dataproxy.go Data Source Proxy: Migrate proxy to its own service and make more extensible (#31927) 2021-03-17 13:10:40 -04:00
datasources_test.go Live: stream resubmit on ds change, fix old ds settings in RunStream (#34130) 2021-05-18 21:39:56 +03:00
datasources.go Live: stream resubmit on ds change, fix old ds settings in RunStream (#34130) 2021-05-18 21:39:56 +03:00
fakes.go PluginManager: Make remaining plugin state non-global (#32094) 2021-03-18 13:53:01 +01:00
folder_permission_test.go PluginManager: Make Plugins, Renderer and DataSources non-global (#31866) 2021-03-17 16:06:10 +01:00
folder_permission.go [Alerting]: Several modifications in alert rules (#32983) 2021-04-15 15:54:37 +03:00
folder_test.go PluginManager: Make Plugins, Renderer and DataSources non-global (#31866) 2021-03-17 16:06:10 +01:00
folder.go add context to getsignedinUser calls (#35963) 2021-06-21 07:51:33 +02:00
frontend_logging_test.go PluginManager: Make remaining plugin state non-global (#32094) 2021-03-18 13:53:01 +01:00
frontend_logging.go Logging: sourcemap support for frontend stacktraces (#30590) 2021-02-04 08:37:28 +02:00
frontend_metrics.go FrontendMetrics: Adds new backend api that frontend can use to push frontend measurements and counters to prometheus (#32593) 2021-04-01 20:04:02 +02:00
frontendsettings_test.go PluginManager: Make Plugins, Renderer and DataSources non-global (#31866) 2021-03-17 16:06:10 +01:00
frontendsettings.go Renderer: add version information (#34964) 2021-06-04 14:33:49 +03:00
grafana_com_proxy.go Chore: Avoid aliasing importing models in api package (#22492) 2020-03-04 12:57:20 +01:00
health_test.go Backend: Migrate to using non-global configuration (#31856) 2021-03-10 12:41:29 +01:00
health.go API: Query database from /api/health endpoint (#28349) 2020-10-21 11:06:19 +02:00
http_server_test.go Tests: Batch of GoConvey to Testify conversions (#27008) 2020-08-14 14:43:25 +02:00
http_server.go Chore: Refactor short url api test (#35051) 2021-06-01 20:34:59 +02:00
index.go Access Control: Add fine-grained access control to explore (#35883) 2021-07-02 14:43:12 +02:00
ldap_debug_test.go add context to getsignedinUser calls (#35963) 2021-06-21 07:51:33 +02:00
ldap_debug.go add context to getsignedinUser calls (#35963) 2021-06-21 07:51:33 +02:00
login_oauth.go Backend: Remove more globals (#29644) 2020-12-15 19:09:04 +01:00
login_test.go Settings: Encapsulate settings within an extensible provider (#32219) 2021-04-28 11:26:58 +02:00
login.go Settings: Encapsulate settings within an extensible provider (#32219) 2021-04-28 11:26:58 +02:00
metrics.go TestData: use new format for random walk example (#34441) 2021-05-19 21:59:43 -07:00
org_invite.go Login: Replace command dispatch by explicit call (#32088) 2021-03-18 17:16:56 +01:00
org_users_test.go 32540: Add org users with pagination (#33788) 2021-05-12 14:10:35 +02:00
org_users.go 32540: Add org users with pagination (#33788) 2021-05-12 14:10:35 +02:00
org.go Chore: Moves common and response into separate packages (#30298) 2021-01-15 14:43:20 +01:00
password.go Chore: Moves common and response into separate packages (#30298) 2021-01-15 14:43:20 +01:00
playlist_play.go Search: add sort information in dashboard results (#30609) 2021-02-11 08:49:16 +01:00
playlist.go Chore: Moves common and response into separate packages (#30298) 2021-01-15 14:43:20 +01:00
plugins.go [Dashboard] Revert feature toggle trimdefaults (#34888) 2021-05-28 22:29:30 +02:00
preferences.go Chore: Moves common and response into separate packages (#30298) 2021-01-15 14:43:20 +01:00
quota.go Chore: Moves common and response into separate packages (#30298) 2021-01-15 14:43:20 +01:00
render.go Rendering: add CSV support (#33729) 2021-05-12 17:16:57 +02:00
search.go Search: add sort information in dashboard results (#30609) 2021-02-11 08:49:16 +01:00
short_url_test.go Chore: Refactor short url api test (#35051) 2021-06-01 20:34:59 +02:00
short_url.go Short URL: Fix so that orgId is included in generated short URL (#34696) 2021-06-01 14:19:10 +02:00
signup.go Login: Replace command dispatch by explicit call (#32088) 2021-03-18 17:16:56 +01:00
stars.go Profile: Fixes profile preferences being accessible when anonymous access was enabled (#31516) 2021-02-27 18:04:28 +01:00
team_members_test.go Add an option to hide certain users in the UI (#28942) 2020-11-24 12:10:32 +01:00
team_members.go Chore: Replace Command dispatches by explicit calls (#32131) 2021-03-19 09:14:14 +01:00
team_test.go PluginManager: Make Plugins, Renderer and DataSources non-global (#31866) 2021-03-17 16:06:10 +01:00
team.go Chore: Replace Command dispatches by explicit calls (#32131) 2021-03-19 09:14:14 +01:00
user_test.go Chore: Convert API tests to standard Go lib (#29009) 2020-11-13 09:52:38 +01:00
user_token_test.go add context to getsignedinUser calls (#35963) 2021-06-21 07:51:33 +02:00
user_token.go add context to getsignedinUser calls (#35963) 2021-06-21 07:51:33 +02:00
user.go add context to getsignedinUser calls (#35963) 2021-06-21 07:51:33 +02:00
utils.go Permissions: Validate against Team/User permission role update (#29101) 2020-11-18 15:36:41 +01:00