User2142845853 posted
Using asp.net c# with OWIN and the built in individual account authentication, it has only a partial set of forms to manage a lost password or adding a phone number but nothing for displaying the USERS and associated ROLES
It would use code like:
public ApplicationRoleManager RoleManager
{
get
{
return roleManager ?? Context.GetOwinContext().Get<ApplicationRoleManager>();
}
}
protected void SomeMethod(args)
{
var x = RoleManager.FindByName("Admin").Users;
which returns x[0].RoleId = "fe900f44f.." and x[0].UserId = "ee87c9450a9b..." hash for userid
How to just get the following:
UserName Email Role (other? date added?)
zzyzxx
zzyzxx@1.com Admin 1/25/2019 EDIT
I have tried several ways. MVC View may be the best since the web forms GridView is so primitive, possibly unchanged since Win95 that it cannot display content unless its inside a disabled dropdown list.
The project has a working RoleManager/etc
public void ConfigureAuth(IAppBuilder app)
{
// Configure the db context, user manager and signin manager to use a single instance per request
app.CreatePerOwinContext(ApplicationDbContext.Create);
app.CreatePerOwinContext<ApplicationUserManager>(ApplicationUserManager.Create);
app.CreatePerOwinContext<ApplicationSignInManager>(ApplicationSignInManager.Create);
app.CreatePerOwinContext<ApplicationRoleManager>(ApplicationRoleManager.Create);
Would like to display it in a nice way with an edit feature