Raids and RaidTemplates are now only editable by their owner or moderators
reworked user rights
This commit is contained in:
parent
cb683723b7
commit
2bf630f3a1
25 changed files with 258 additions and 270 deletions
|
@ -34,22 +34,12 @@ namespace Lieb.Data
|
|||
{
|
||||
user.GuildWars2Accounts.Add(account);
|
||||
}
|
||||
await context.SaveChangesAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
GuildWars2Account? accountToChange = context.GuildWars2Accounts
|
||||
.Include(a => a.EquippedBuilds)
|
||||
.FirstOrDefault(a => a.GuildWars2AccountId == account.GuildWars2AccountId);
|
||||
|
||||
if (accountToChange != null)
|
||||
{
|
||||
accountToChange.AccountName = account.AccountName;
|
||||
accountToChange.ApiKey = account.ApiKey;
|
||||
|
||||
await context.SaveChangesAsync();
|
||||
}
|
||||
context.Update(account);
|
||||
}
|
||||
await context.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue