Fixed a build error in GrpcApiPermsInterceptor.cs
This commit is contained in:
parent
252d15bf1d
commit
2548947c58
1 changed files with 2 additions and 0 deletions
|
@ -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}",
|
||||
|
|
Loading…
Reference in a new issue