summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/stub/check.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/stub/check.go b/internal/stub/check.go
index ec257e3..073b35b 100644
--- a/internal/stub/check.go
+++ b/internal/stub/check.go
@@ -17,7 +17,7 @@ func (m Check) CheckPermission(ctx context.Context, r *v1.CheckPermissionRequest
return m(ctx, r)
}
-func AllowWith(t *testing.T, subject string, permission string, resource string) authz.PermissionService {
+func AllowWith(t *testing.T, subject string, permission string, resource string) authz.CheckPermissionService {
user := strings.SplitN(subject, ":", 2)
model := strings.SplitN(resource, ":", 2)
@@ -36,7 +36,7 @@ func AllowWith(t *testing.T, subject string, permission string, resource string)
})
}
-func Allow() authz.PermissionService {
+func Allow() authz.CheckPermissionService {
return Check(func(ctx context.Context, r *v1.CheckPermissionRequest) (*v1.CheckPermissionResponse, error) {
return &v1.CheckPermissionResponse{
Permissionship: v1.CheckPermissionResponse_PERMISSIONSHIP_HAS_PERMISSION,
@@ -44,7 +44,7 @@ func Allow() authz.PermissionService {
})
}
-func Deny() authz.PermissionService {
+func Deny() authz.CheckPermissionService {
return Check(func(ctx context.Context, r *v1.CheckPermissionRequest) (*v1.CheckPermissionResponse, error) {
return &v1.CheckPermissionResponse{
Permissionship: v1.CheckPermissionResponse_PERMISSIONSHIP_NO_PERMISSION,