diff --git a/Application/Migration/1744416000-seed-admin-user.sql b/Application/Migration/1744416000-seed-admin-user.sql index c5583e5..7ee7c2b 100644 --- a/Application/Migration/1744416000-seed-admin-user.sql +++ b/Application/Migration/1744416000-seed-admin-user.sql @@ -1,6 +1,7 @@ -- Seed default admin user for initial local deployment. -- Password: admin1234! --- Hash generated with bcrypt cost 10 (compatible with IHP's authenticate @User). +-- Hash generated with pwstore-fast (Crypto.PasswordStore.makePassword, strength 17) +-- which is the format IHP's verifyPassword uses. NOT bcrypt. -- IMPORTANT: Change this password immediately after first login via the profile settings. -- Workplan: IHUB-WP-0014 (A4 — admin user seeding) @@ -8,7 +9,7 @@ INSERT INTO users (id, email, password_hash, name, failed_login_attempts, create VALUES ( uuid_generate_v4(), 'admin@inter-hub.local', - '$2b$10$c3imjL8nLkR1TSbBifvR3eFzlCUurGPXsN7K5trDjmZL6Af3zLqH.', + 'sha256|17|hyVUQpp0hhegCg2oM0lUHQ==|jSwCi+tJUlKCW6sT6nn23/r71fd0GSiVOo48JSrXyWc=', 'Admin', 0, now() diff --git a/Web/Controller/Api/V2/Registries.hs b/Web/Controller/Api/V2/Registries.hs index fd408ad..5ecd981 100644 --- a/Web/Controller/Api/V2/Registries.hs +++ b/Web/Controller/Api/V2/Registries.hs @@ -16,21 +16,21 @@ instance Controller ApiV2RegistriesController where action ApiV2ListWidgetTypesAction = do types <- query @WidgetTypeRegistry |> filterWhere (#status, "active") - |> orderByAsc #label_ + |> orderByAsc #name |> fetch renderJson $ map wtToJson types action ApiV2ListEventTypesAction = do types <- query @EventTypeRegistry |> filterWhere (#status, "active") - |> orderByAsc #label_ + |> orderByAsc #name |> fetch renderJson $ map etToJson types action ApiV2ListAnnotationCategoriesAction = do cats <- query @AnnotationCategoryRegistry |> filterWhere (#status, "active") - |> orderByAsc #label_ + |> orderByAsc #name |> fetch renderJson $ map acToJson cats diff --git a/Web/Controller/TypeRegistries.hs b/Web/Controller/TypeRegistries.hs index 168bf5a..86383c9 100644 --- a/Web/Controller/TypeRegistries.hs +++ b/Web/Controller/TypeRegistries.hs @@ -16,7 +16,7 @@ instance Controller TypeRegistriesController where action WidgetTypeRegistryAction = do entries <- query @WidgetTypeRegistry - |> orderByAsc #label_ + |> orderByAsc #name |> fetch hubs <- query @Hub |> fetch render WidgetTypesView { entries, hubs } @@ -83,7 +83,7 @@ instance Controller TypeRegistriesController where action EventTypeRegistryAction = do entries <- query @EventTypeRegistry - |> orderByAsc #label_ + |> orderByAsc #name |> fetch hubs <- query @Hub |> fetch render EventTypesView { entries, hubs } @@ -149,7 +149,7 @@ instance Controller TypeRegistriesController where action AnnotationCategoryRegistryAction = do entries <- query @AnnotationCategoryRegistry - |> orderByAsc #label_ + |> orderByAsc #name |> fetch hubs <- query @Hub |> fetch render AnnotationCategoriesView { entries, hubs } @@ -215,7 +215,7 @@ instance Controller TypeRegistriesController where action PolicyScopeRegistryAction = do entries <- query @PolicyScopeRegistry - |> orderByAsc #label_ + |> orderByAsc #name |> fetch hubs <- query @Hub |> fetch render PolicyScopesView { entries, hubs } diff --git a/Web/FrontController.hs b/Web/FrontController.hs index 6888739..400bf75 100644 --- a/Web/FrontController.hs +++ b/Web/FrontController.hs @@ -192,7 +192,10 @@ defaultLayout inner = [hsx| AI Gov Learning