services/mgmt/lib/acls: fix a dependency violation
Fix an accidentally introduced dependency violation in the acls
implementation.
Change-Id: I35ec77c08bbaaf048c6cd0f0f5eb7471244c6237
diff --git a/services/mgmt/lib/acls/hierarchical_authorizer.go b/services/mgmt/lib/acls/hierarchical_authorizer.go
index 5b5e921..7072e13 100644
--- a/services/mgmt/lib/acls/hierarchical_authorizer.go
+++ b/services/mgmt/lib/acls/hierarchical_authorizer.go
@@ -9,8 +9,6 @@
"v.io/v23/security"
"v.io/v23/security/access"
"v.io/x/lib/vlog"
-
- "v.io/x/ref/profiles/internal/rpc"
)
// hierarchicalAuthorizer contains the state needed to implement
@@ -105,7 +103,8 @@
// defaultAuthorizer implements an authorization policy that requires one end
// of the RPC to have a blessing that makes it a delegate of the other.
-// TODO(rjkroege): Remove this when the defaultAuthorizer becomes public.
+// TODO(rjkroege): Remove this and the above when the defaultAuthorizer becomes
+// public.
func defaultAuthorizer(ctx *context.T) error {
var (
localNames = security.LocalBlessingNames(ctx)
@@ -126,5 +125,5 @@
}
}
- return rpc.NewErrInvalidBlessings(nil, remoteNames, remoteErr, localNames)
+ return access.NewErrNoPermissions(ctx, remoteNames, remoteErr, "by policy")
}