From 2548947c589ca55b1da62b71ab3fe4b1c631dfdd Mon Sep 17 00:00:00 2001 From: Toastie Date: Fri, 11 Oct 2024 00:15:57 +1300 Subject: [PATCH] Fixed a build error in GrpcApiPermsInterceptor.cs --- src/EllieBot/Services/GrpcApiPermsInterceptor.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/EllieBot/Services/GrpcApiPermsInterceptor.cs b/src/EllieBot/Services/GrpcApiPermsInterceptor.cs index 2cee522..c3a5b47 100644 --- a/src/EllieBot/Services/GrpcApiPermsInterceptor.cs +++ b/src/EllieBot/Services/GrpcApiPermsInterceptor.cs @@ -32,6 +32,8 @@ public sealed partial class GrpcApiPermsInterceptor : Interceptor if (!metadata.ContainsKey("userid")) throw new RpcException(new Status(StatusCode.Unauthenticated, "userid has to be specified")); + var method = context.Method[(context.Method.LastIndexOf('/') + 1)..]; + if (perms.TryGetValue(method, out var perm)) { Log.Information("Required permission for {Method} is {Perm}",