mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-01-23 01:32:16 +00:00
oink
This commit is contained in:
parent
5ddc948f4e
commit
8c265ebf36
1 changed files with 1 additions and 1 deletions
|
@ -588,7 +588,7 @@ public ActionResult AddUserToRole(string id = "")
|
||||||
public async Task<ActionResult> AddUserToRole(AddUserToRoleViewModel model)
|
public async Task<ActionResult> AddUserToRole(AddUserToRoleViewModel model)
|
||||||
{
|
{
|
||||||
var r = db.Roles.FirstOrDefault(role => role.Id == model.RoleId);
|
var r = db.Roles.FirstOrDefault(role => role.Id == model.RoleId);
|
||||||
var user = db.Users.FirstOrDefault(u => u.DisplayName == model.Username);
|
var user = db.Users.FirstOrDefault(u => u.Id == model.Username);
|
||||||
var uMan = HttpContext.GetOwinContext().GetUserManager<ApplicationUserManager>();
|
var uMan = HttpContext.GetOwinContext().GetUserManager<ApplicationUserManager>();
|
||||||
|
|
||||||
var isInRole = await uMan.IsInRoleAsync(user.Id, r.Name);
|
var isInRole = await uMan.IsInRoleAsync(user.Id, r.Name);
|
||||||
|
|
Loading…
Reference in a new issue