diff options
| author | mo khan <mo@mokhan.ca> | 2025-04-01 21:50:36 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-04-01 21:50:36 -0600 |
| commit | c851e7d0ff5cbc33dfec8df068529aeb2c70ebfc (patch) | |
| tree | 9ae59eb708c719f49335595b9c6bb2498da8d696 /pkg/rpc/ability_handler.go | |
| parent | 7f6dddcde0ebab4c8245cbddad8105016a2fba73 (diff) | |
refactor: decouple authzd from cedar authorizer
Diffstat (limited to 'pkg/rpc/ability_handler.go')
| -rw-r--r-- | pkg/rpc/ability_handler.go | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/pkg/rpc/ability_handler.go b/pkg/rpc/ability_handler.go index a881b41b..b36ce14e 100644 --- a/pkg/rpc/ability_handler.go +++ b/pkg/rpc/ability_handler.go @@ -2,19 +2,14 @@ package rpc import ( context "context" - "net/http" - - "github.com/xlgmokha/x/pkg/x" - "gitlab.com/mokhax/spike/pkg/authz" ) type AbilityHandler struct { - authorizer authz.Authorizer UnimplementedAbilityServer } func (h *AbilityHandler) Allowed(ctx context.Context, req *AllowRequest) (*AllowReply, error) { - // TODO:: Replace http.Request with authz.Request - request := x.Must(http.NewRequestWithContext(ctx, req.Permission, req.Resource, nil)) - return &AllowReply{Result: h.authorizer.Authorize(request)}, nil + return &AllowReply{ + Result: false, + }, nil } |
