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
|
@ -61,7 +61,7 @@ namespace Discord.OAuth2
|
|||
}
|
||||
else
|
||||
{
|
||||
LiebRole standardRole = await _LiebDbcontext.LiebRoles.FirstOrDefaultAsync(m => m.RoleName == Constants.Roles.User);
|
||||
LiebRole standardRole = await _LiebDbcontext.LiebRoles.FirstOrDefaultAsync(m => m.RoleName == Constants.Roles.User.Name);
|
||||
string userName = context.Identity.Claims.FirstOrDefault(x => x.Type == ClaimTypes.Name).Value;
|
||||
LiebUser newUser = new LiebUser()
|
||||
{
|
||||
|
@ -78,7 +78,7 @@ namespace Discord.OAuth2
|
|||
_LiebDbcontext.RoleAssignments.Add(roleAssignment);
|
||||
await _LiebDbcontext.SaveChangesAsync();
|
||||
|
||||
context.Identity.AddClaim(new Claim(Constants.ClaimType, Constants.Roles.User));
|
||||
context.Identity.AddClaim(new Claim(Constants.ClaimType, Constants.Roles.User.Name));
|
||||
}
|
||||
return context;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue