Raids and RaidTemplates are now only editable by their owner or moderators

reworked user rights
This commit is contained in:
t.ruspekhofer 2022-03-21 01:12:35 +01:00
parent cb683723b7
commit 2bf630f3a1
25 changed files with 258 additions and 270 deletions

View file

@ -115,7 +115,7 @@
{
var authState = await AuthenticationStateProvider.GetAuthenticationStateAsync();
ulong discordId = ulong.Parse(authState.User.Claims.FirstOrDefault(c => c.Type == ClaimTypes.NameIdentifier).Value);
_user = UserService.GetLiebUserSmall(discordId);
_user = UserService.GetLiebUserGW2AccountOnly(discordId);
if(!string.IsNullOrEmpty(gw2Id) && int.TryParse(gw2Id, out int parsedId) && _user.GuildWars2Accounts.Where(a => a.GuildWars2AccountId == parsedId).Any())
{