This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
flags enabled: promo_parties_and_roles, promo_parties_and_roles_create_dummy_user | |
script to backpopulate dummy user has been run | |
1. New user, validation errors on submit | |
starting at /new | |
new user i.e. "Create a new user" | |
select "Business" account type | |
=> [ok] expect Company Name to be enabled, blanked, searchable | |
=> [ok] expect NZBN to be enabled, blanked, searchable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Startup.cs | |
services.AddDbContext<ApplicationDbContext>(options => | |
options.UseSqlServer( | |
Configuration.GetConnectionString("DefaultConnection"))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker stop sql_server | |
docker start sql_server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Pages/Post/Edit.razor | |
<div class="row"> | |
<div class="col-6"> | |
<input type="hidden" @bind-value="@post.Body" /> | |
<textarea rows="20" class="form-control" id="body" @bind="@post.Body" @bind:event="oninput" /> | |
</div> | |
<div class="col-6"> | |
@((MarkupString) post.MarkupString) | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Post.cs | |
using Markdig; | |
namespace Golb.Data | |
{ | |
public class Post | |
{ | |
... etc | |
public string MarkupString { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dotnet add package Markdig --version 0.22.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Startup.cs | |
...etc | |
using Microsoft.AspNetCore.Authorization; | |
public void ConfigureServices(IServiceCollection services) | |
{ | |
... etc | |
services.AddDefaultIdentity<IdentityUser>(options => options.SignIn.RequireConfirmedAccount = true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Data/ApplicationInitialiser.cs | |
using Microsoft.AspNetCore.Identity; | |
using System.Threading.Tasks; | |
public static class ApplicationInitialiser | |
{ | |
private const string ADMIN_ROLE = "Admin"; | |
public static async Task Initialise(UserManager<IdentityUser> userManager, RoleManager<IdentityRole> roleManager) |
NewerOlder