summaryrefslogtreecommitdiff
path: root/pkg/rpc/ability_handler.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/rpc/ability_handler.go')
-rw-r--r--pkg/rpc/ability_handler.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/rpc/ability_handler.go b/pkg/rpc/ability_handler.go
index 973e1db8..bf299da9 100644
--- a/pkg/rpc/ability_handler.go
+++ b/pkg/rpc/ability_handler.go
@@ -7,15 +7,15 @@ import (
"gitlab.com/mokhax/spike/pkg/policies"
)
-type AbilityHandler struct {
+type AbilityService struct {
UnimplementedAbilityServer
}
-func NewAbilityHandler() *AbilityHandler {
- return &AbilityHandler{}
+func NewAbilityService() *AbilityService {
+ return &AbilityService{}
}
-func (h *AbilityHandler) Allowed(ctx context.Context, req *AllowRequest) (*AllowReply, error) {
+func (h *AbilityService) Allowed(ctx context.Context, req *AllowRequest) (*AllowReply, error) {
ok := policies.Allowed(cedar.Request{
Principal: cedar.NewEntityUID("User", cedar.String(req.Subject)),
Action: cedar.NewEntityUID("Action", cedar.String(req.Permission)),