Dynamic User Roles

This commit is contained in:
Shaun Walker
2019-08-20 16:43:35 -04:00
parent de4fa48a29
commit 42c6efbfdb
51 changed files with 942 additions and 193 deletions

View File

@ -169,7 +169,8 @@
user.Password = HostPassword;
user.IsSuperUser = true;
user.Roles = "";
await UserService.AddUserAsync(user);
user = await UserService.AddUserAsync(user);
UriHelper.NavigateTo("", true);
}
else

View File

@ -21,8 +21,8 @@
}
else
{
// layout does not exist with type specified
}
// layout does not exist with type specified
}
};
}
}

View File

@ -195,7 +195,7 @@
var authState = await AuthenticationStateProvider.GetAuthenticationStateAsync();
if (authState.User.Identity.IsAuthenticated)
{
user = await UserService.GetUserAsync(authState.User.Identity.Name);
user = await UserService.GetUserAsync(authState.User.Identity.Name, site.SiteId);
}
}
else

View File

@ -20,8 +20,8 @@
}
else
{
// theme does not exist with type specified
builder.OpenComponent(0, Type.GetType(Constants.ModuleMessageControl));
// theme does not exist with type specified
builder.OpenComponent(0, Type.GetType(Constants.ModuleMessageControl));
builder.AddAttribute(1, "Type", MessageType.Error);
builder.AddAttribute(2, "Message", "Error Loading Page Theme " + PageState.Page.ThemeType);
builder.CloseComponent();