Permission-based authorization utilizing Policies
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user