Permission-based authorization utilizing Policies

This commit is contained in:
Shaun Walker
2019-08-27 17:14:41 -04:00
parent f037898c6e
commit 3ce7f1a227
54 changed files with 1104 additions and 388 deletions

View File

@ -82,10 +82,10 @@
<tbody>
<tr>
<td>
<label for="Title" class="control-label" style="font-weight: bold">Username: </label>
<label for="Title" class="control-label" style="font-weight: bold">Email: </label>
</td>
<td>
<input type="text" id="Email" class="form-control" @bind="@HostUsername" />
<input type="text" id="Email" class="form-control" @bind="@Email" />
</td>
</tr>
<tr>
@ -115,7 +115,7 @@
private string DatabaseName = "Oqtane-" + DateTime.Now.ToString("yyyyMMddHHmm");
private string Username = "";
private string Password = "";
private string HostUsername = "host";
private string Email = "";
private string HostPassword = "";
private string Message = "";
@ -164,11 +164,11 @@
{
User user = new User();
user.SiteId = 1;
user.Username = HostUsername;
user.DisplayName = HostUsername;
user.Username = Email;
user.DisplayName = Email;
user.Email = Email;
user.Password = HostPassword;
user.IsSuperUser = true;
user.Roles = "";
user.IsHost = true;
user = await UserService.AddUserAsync(user);
UriHelper.NavigateTo("", true);