示例#1
0
        public async Task <bool> IsLeaderOf(ClaimsPrincipal user, long teamId)
        {
            var userId       = user.GetDiscordId();
            var teamIdString = teamId.ToString();

            return(await UserClaims.CountAsync(claim => claim.UserId == userId && claim.ClaimType == AppClaimTypes.RaidLeader && claim.ClaimValue == teamIdString) > 0);
        }