summaryrefslogtreecommitdiff
path: root/bin/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'bin/rpc')
-rwxr-xr-xbin/rpc6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/rpc b/bin/rpc
index 92c8c824..d0c1cd80 100755
--- a/bin/rpc
+++ b/bin/rpc
@@ -11,7 +11,7 @@ gemfile do
gem "logger", "~> 1.0"
end
-lib_path = Pathname.new(__FILE__).parent.parent.join('lib').realpath.to_s
+lib_path = Pathname.new(__FILE__).parent.parent.join('lib/authx/rpc').realpath.to_s
$LOAD_PATH.unshift(lib_path) unless $LOAD_PATH.include?(lib_path)
require 'ability_services_pb'
@@ -22,12 +22,12 @@ class ProjectPolicy < DeclarativePolicy::Base
rule { owner }.enable :create_project
end
-class AbilityHandler < ::Authx::Ability::Service
+class AbilityHandler < ::Authx::Rpc::Ability::Service
def allowed(request, _call)
puts [request, _call].inspect
GRPC.logger.info([request, _call].inspect)
- ::Authx::AllowReply.new(result: true)
+ ::Authx::Rpc::AllowReply.new(result: true)
# TODO:: entrypoint to declarative policies
# AllowReply.new(result: policy_for(request).can?(request.permission))
end