grafana/pkg/services/accesscontrol
sh0rez 3d5d8c785b
pkg/web: restrict handler types (#48495)
Makes `pkg/web` only accept handles from the following set:

```go
	handlerStd       = func(http.ResponseWriter, *http.Request)
	handlerStdCtx    = func(http.ResponseWriter, *http.Request, *web.Context)
	handlerStdReqCtx = func(http.ResponseWriter, *http.Request, *models.ReqContext)
	handlerReqCtx    = func(*models.ReqContext)
	handlerReqCtxRes = func(*models.ReqContext) Response
	handlerCtx       = func(*web.Context)
```

This is a first step to reducing above set to only `http.Handler`.

---

Due to a cyclic import situation between `pkg/models` and `pkg/web`, parts of this PR were put into `pkg/api/response`, even though they definitely do not belong there. This however is _temporary_ until we untangle `models.ReqContext`.
2022-05-20 12:45:18 -04:00
..
api AccessControl: Add endpoint to get user permissions (#45309) 2022-02-11 17:40:43 +01:00
database AccessControl: Only return action and scope for user permissions and make them unique (#48939) 2022-05-12 17:15:18 +02:00
mock Remove unused error from evaluator Evaluate (#49305) 2022-05-20 10:26:57 +02:00
ossaccesscontrol Remove unused error from evaluator Evaluate (#49305) 2022-05-20 10:26:57 +02:00
resourcepermissions pkg/web: restrict handler types (#48495) 2022-05-20 12:45:18 -04:00
accesscontrol_bench_test.go Access Control: Support other attributes than id for resource permissions (#46727) 2022-03-21 17:58:18 +01:00
accesscontrol_test.go Access Control: Support other attributes than id for resource permissions (#46727) 2022-03-21 17:58:18 +01:00
accesscontrol.go Alerting: Fix anonymous access to alerting (#49203) 2022-05-19 09:22:26 -04:00
errors.go AccessControl: Resolve attribute based scopes to id based scopes (#40742) 2022-01-18 17:34:35 +01:00
evaluator_test.go Remove unused error from evaluator Evaluate (#49305) 2022-05-20 10:26:57 +02:00
evaluator.go Remove unused error from evaluator Evaluate (#49305) 2022-05-20 10:26:57 +02:00
filter_bench_test.go Access Control: Support other attributes than id for resource permissions (#46727) 2022-03-21 17:58:18 +01:00
filter_test.go Access Control: Correctly check for id suffix (#46824) 2022-03-22 13:48:15 +01:00
filter.go Access control: Pass access control metadata for api keys (#48445) 2022-04-29 15:30:24 +02:00
middleware_test.go pkg/web: restrict handler types (#48495) 2022-05-20 12:45:18 -04:00
middleware.go Access Control: Move access control middlewares to domain package (#48322) 2022-04-28 10:46:18 +02:00
models.go Alerting: Fix RBAC actions for notification policies (#49185) 2022-05-20 10:55:07 -04:00
resolvers_test.go Access Control: Refactor scope resolvers with support to resolve into several scopes (#48202) 2022-05-02 09:29:30 +02:00
resolvers.go Access Control: Refactor scope resolvers with support to resolve into several scopes (#48202) 2022-05-02 09:29:30 +02:00
roles_test.go AccessControl: Remove package lists for roles and grants (#47141) 2022-04-06 09:31:14 +02:00
roles.go AccessControl: Rename builtin role roles to basic roles (#48519) 2022-05-03 13:59:16 +02:00
scope_test.go Access Control: Refactor scope resolvers with support to resolve into several scopes (#48202) 2022-05-02 09:29:30 +02:00
scope.go Access Control: Refactor scope resolvers with support to resolve into several scopes (#48202) 2022-05-02 09:29:30 +02:00