fix: close web access to foreign groups and sessions
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
using System.Security.Claims;
|
||||
|
||||
namespace GmRelay.Web.Services;
|
||||
|
||||
public static class ClaimsPrincipalExtensions
|
||||
{
|
||||
public static bool TryGetTelegramId(this ClaimsPrincipal user, out long telegramId) =>
|
||||
long.TryParse(user.FindFirst("TelegramId")?.Value, out telegramId);
|
||||
}
|
||||
Reference in New Issue
Block a user