create default rex files with static keys
This commit is contained in:
@ -13,7 +13,7 @@
|
||||
<table class="table table-borderless">
|
||||
<tr>
|
||||
<td>
|
||||
<label class="control-label">@Localizer["Username:"] </label>
|
||||
<label class="control-label">@Localizer["Username"] </label>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control" @bind="@username" />
|
||||
@ -21,7 +21,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label class="control-label">@Localizer["Password:"] </label>
|
||||
<label class="control-label">@Localizer["Password"] </label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="password" class="form-control" @bind="@password" />
|
||||
@ -29,7 +29,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label class="control-label">@Localizer["Confirm Password:"] </label>
|
||||
<label class="control-label">@Localizer["Password.Confirm"] </label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="password" class="form-control" @bind="@confirm" />
|
||||
@ -37,7 +37,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label class="control-label">@Localizer["Email:"] </label>
|
||||
<label class="control-label">@Localizer["Email"] </label>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control" @bind="@email" />
|
||||
@ -45,7 +45,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label class="control-label">@Localizer["Full Name:"] </label>
|
||||
<label class="control-label">@Localizer["FullName"] </label>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control" @bind="@displayname" />
|
||||
@ -116,7 +116,7 @@
|
||||
catch (Exception ex)
|
||||
{
|
||||
await logger.LogError(ex, "Error Loading User Profile {Error}", ex.Message);
|
||||
AddModuleMessage(Localizer["Error Loading User Profile"], MessageType.Error);
|
||||
AddModuleMessage(Localizer["Error.Profile.Load"], MessageType.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@ -153,28 +153,28 @@
|
||||
else
|
||||
{
|
||||
await logger.LogError("Error Adding User {Username} {Email}", username, email);
|
||||
AddModuleMessage(Localizer["Error Adding User. Please Ensure Password Meets Complexity Requirements And Username And Email Are Not Already In Use."], MessageType.Error);
|
||||
AddModuleMessage(Localizer["Error.User.AddCheckPass"], MessageType.Error);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
AddModuleMessage(Localizer["Username Already Exists"], MessageType.Warning);
|
||||
AddModuleMessage(Localizer["Message.Username.Exists"], MessageType.Warning);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
AddModuleMessage(Localizer["Passwords Entered Do Not Match"], MessageType.Warning);
|
||||
AddModuleMessage(Localizer["Message.Password.NoMatch"], MessageType.Warning);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
AddModuleMessage(Localizer["You Must Provide A Username, Password, Email Address And All Required Profile Information"], MessageType.Warning);
|
||||
AddModuleMessage(Localizer["Message.Required.ProfileInfo"], MessageType.Warning);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
await logger.LogError(ex, "Error Adding User {Username} {Email} {Error}", username, email, ex.Message);
|
||||
AddModuleMessage(Localizer["Error Adding User"], MessageType.Error);
|
||||
AddModuleMessage(Localizer["Error.User.Add"], MessageType.Error);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ else
|
||||
<table class="table table-borderless">
|
||||
<tr>
|
||||
<td>
|
||||
<label class="control-label">@Localizer["Username:"] </label>
|
||||
<label class="control-label">@Localizer["Username"] </label>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control" @bind="@username" readonly />
|
||||
@ -30,7 +30,7 @@ else
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label class="control-label">@Localizer["Password:"] </label>
|
||||
<label class="control-label">@Localizer["Password"] </label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="password" class="form-control" @bind="@password" />
|
||||
@ -38,7 +38,7 @@ else
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label class="control-label">@Localizer["Confirm Password:"] </label>
|
||||
<label class="control-label">@Localizer["Password.Confirm"] </label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="password" class="form-control" @bind="@confirm" />
|
||||
@ -46,7 +46,7 @@ else
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label class="control-label">@Localizer["Email:"] </label>
|
||||
<label class="control-label">@Localizer["Email"] </label>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control" @bind="@email" />
|
||||
@ -54,7 +54,7 @@ else
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label class="control-label">@Localizer["Full Name:"] </label>
|
||||
<label class="control-label">@Localizer["FullName"] </label>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control" @bind="@displayname" />
|
||||
@ -62,7 +62,7 @@ else
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label class="control-label">@Localizer["Photo:"] </label>
|
||||
<label class="control-label">@Localizer["Photo"] </label>
|
||||
</td>
|
||||
<td>
|
||||
<FileManager FileId="@photofileid" @ref="filemanager" />
|
||||
@ -70,7 +70,7 @@ else
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label class="control-label">@Localizer["Is Deleted?"] </label>
|
||||
<label class="control-label">@Localizer["Confirm.Delete"] </label>
|
||||
</td>
|
||||
<td>
|
||||
<select class="form-control" @bind="@isdeleted">
|
||||
@ -187,7 +187,7 @@ else
|
||||
catch (Exception ex)
|
||||
{
|
||||
await logger.LogError(ex, "Error Loading User {UserId} {Error}", userid, ex.Message);
|
||||
AddModuleMessage(Localizer["Error Loading User"], MessageType.Error);
|
||||
AddModuleMessage(Localizer["Error.User.Load"], MessageType.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@ -225,18 +225,18 @@ else
|
||||
}
|
||||
else
|
||||
{
|
||||
AddModuleMessage(Localizer["Passwords Entered Do Not Match"], MessageType.Warning);
|
||||
AddModuleMessage(Localizer["Message.Password.NoMatch"], MessageType.Warning);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
AddModuleMessage(Localizer["You Must Provide A Username, Password, Email Address, And All Required Profile Information"], MessageType.Warning);
|
||||
AddModuleMessage(Localizer["Message.Required.ProfileInfo"], MessageType.Warning);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
await logger.LogError(ex, "Error Saving User {Username} {Email} {Error}", username, email, ex.Message);
|
||||
AddModuleMessage(Localizer["Error Saving User"], MessageType.Error);
|
||||
AddModuleMessage(Localizer["Error.User.Save"], MessageType.Error);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
@if (userroles == null)
|
||||
{
|
||||
<p>
|
||||
<em>@Localizer["Loading..."]</em>
|
||||
<em>@Localizer["Loading"]</em>
|
||||
</p>
|
||||
}
|
||||
else
|
||||
@ -36,7 +36,7 @@ else
|
||||
<ActionLink Action="Edit" Parameters="@($"id=" + context.UserId.ToString())" ResourceKey="EditUser" />
|
||||
</td>
|
||||
<td>
|
||||
<ActionDialog Header="Delete User" Message="@Localizer["Are You Sure You Wish To Delete {0}?", context.User.DisplayName]" Action="Delete" Security="SecurityAccessLevel.Admin" Class="btn btn-danger" OnClick="@(async () => await DeleteUser(context))" Disabled="@(context.Role.Name == RoleNames.Host)" ResourceKey="DeleteUser" />
|
||||
<ActionDialog Header="Delete User" Message="@string.Format(Localizer["Confirm.User.Delete"], context.User.DisplayName)" Action="Delete" Security="SecurityAccessLevel.Admin" Class="btn btn-danger" OnClick="@(async () => await DeleteUser(context))" Disabled="@(context.Role.Name == RoleNames.Host)" ResourceKey="DeleteUser" />
|
||||
</td>
|
||||
<td>
|
||||
<ActionLink Action="Roles" Parameters="@($"id=" + context.UserId.ToString())" ResourceKey="Roles" />
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
@if (userroles == null)
|
||||
{
|
||||
<p><em>@Localizer["Loading..."]</em></p>
|
||||
<p><em>@Localizer["Loading"]</em></p>
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -26,7 +26,7 @@ else
|
||||
</td>
|
||||
<td>
|
||||
<select id="role" class="form-control" @bind="@roleid">
|
||||
<option value="-1"><@Localizer["Select Role"]></option>
|
||||
<option value="-1"><@Localizer["Role.Select"]></option>
|
||||
@foreach (Role role in roles)
|
||||
{
|
||||
<option value="@(role.RoleId)">@role.Name</option>
|
||||
@ -68,7 +68,7 @@ else
|
||||
<td>@context.EffectiveDate</td>
|
||||
<td>@context.ExpiryDate</td>
|
||||
<td>
|
||||
<ActionDialog Header="Remove Role" Message="@Localizer["Are You Sure You Wish To Remove This User From The {0} Role?", context.Role.Name]" Action="Delete" Security="SecurityAccessLevel.Admin" Class="btn btn-danger" OnClick="@(async () => await DeleteUserRole(context.UserRoleId))" Disabled="@(context.Role.IsAutoAssigned || (context.Role.Name == RoleNames.Host && userid == PageState.User.UserId))" ResourceKey="DeleteUserRole" />
|
||||
<ActionDialog Header="Remove Role" Message="@string.Format(Localizer["Confirm.User.RemoveRole"], context.Role.Name)" Action="Delete" Security="SecurityAccessLevel.Admin" Class="btn btn-danger" OnClick="@(async () => await DeleteUserRole(context.UserRoleId))" Disabled="@(context.Role.IsAutoAssigned || (context.Role.Name == RoleNames.Host && userid == PageState.User.UserId))" ResourceKey="DeleteUserRole" />
|
||||
</td>
|
||||
</Row>
|
||||
</Pager>
|
||||
@ -107,7 +107,7 @@ else
|
||||
catch (Exception ex)
|
||||
{
|
||||
await logger.LogError(ex, "Error Loading Roles {Error}", ex.Message);
|
||||
AddModuleMessage(Localizer["Error Loading Roles"], MessageType.Error);
|
||||
AddModuleMessage(Localizer["Error.LoadRole"], MessageType.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@ -121,7 +121,7 @@ else
|
||||
catch (Exception ex)
|
||||
{
|
||||
await logger.LogError(ex, "Error Loading User Roles {UserId} {Error}", userid, ex.Message);
|
||||
AddModuleMessage(Localizer["Error Loading User Roles"], MessageType.Error);
|
||||
AddModuleMessage(Localizer["Error.User.LoadRole"], MessageType.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@ -181,19 +181,19 @@ else
|
||||
}
|
||||
|
||||
await logger.LogInformation("User Assigned To Role {UserRole}", userrole);
|
||||
AddModuleMessage(Localizer["User Assigned To Role"], MessageType.Success);
|
||||
AddModuleMessage(Localizer["Success.User.AssignRole"], MessageType.Success);
|
||||
await GetUserRoles();
|
||||
StateHasChanged();
|
||||
}
|
||||
else
|
||||
{
|
||||
AddModuleMessage(Localizer["You Must Select A Role"], MessageType.Warning);
|
||||
AddModuleMessage(Localizer["Message.Required.Role"], MessageType.Warning);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
await logger.LogError(ex, "Error Saving User Roles {UserId} {Error}", userid, ex.Message);
|
||||
AddModuleMessage(Localizer["Error Saving User Roles"], MessageType.Error);
|
||||
AddModuleMessage(Localizer["Error.User.SaveRole"], MessageType.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@ -203,14 +203,14 @@ else
|
||||
{
|
||||
await UserRoleService.DeleteUserRoleAsync(UserRoleId);
|
||||
await logger.LogInformation("User Removed From Role {UserRoleId}", UserRoleId);
|
||||
AddModuleMessage(Localizer["User Removed From Role"], MessageType.Success);
|
||||
AddModuleMessage(Localizer["Success.User.Remove"], MessageType.Success);
|
||||
await GetUserRoles();
|
||||
StateHasChanged();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
await logger.LogError(ex, "Error Removing User From Role {UserRoleId} {Error}", UserRoleId, ex.Message);
|
||||
AddModuleMessage(Localizer["Error Removing User From Role"], MessageType.Error);
|
||||
AddModuleMessage(Localizer["Error.User.RemoveRole"], MessageType.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user