public async Task <bool> RemoveUserFromRole(FPUser user, string roleName) { var result = await _userManager.RemoveFromRoleAsync(user, roleName); return(result.Succeeded); }
public async Task <bool> IsUserInRole(FPUser user, string roleName) { return(await _userManager.IsInRoleAsync(user, roleName)); }
public async Task <IEnumerable <string> > ListUserRoles(FPUser user) { return(await _userManager.GetRolesAsync(user)); }
public async Task <bool> AddUserToRole(FPUser user, string roleName) { var result = await _userManager.AddToRoleAsync(user, roleName); return(result.Succeeded); }