refinement phase 2
This commit is contained in:
+22
@@ -1,5 +1,6 @@
|
||||
#nullable enable
|
||||
using Baya.Domain.Entities.Catalog;
|
||||
using Baya.Domain.Entities.User;
|
||||
using Baya.Domain.Entities.Verification;
|
||||
using Baya.Infrastructure.Persistence.Configuration.GeographyConfig;
|
||||
|
||||
@@ -131,6 +132,19 @@ internal static class DemoWorldDefinitions
|
||||
]),
|
||||
];
|
||||
|
||||
/// <summary>
|
||||
/// Demo backoffice operators so the admin console is reachable through the same phone-OTP login the
|
||||
/// customers/nurses use (admin sub-roles are server-granted, never self-selectable via <c>select_role</c>,
|
||||
/// so they must be seeded). Two roles are seeded on purpose: a <c>super_admin</c> that sees every console
|
||||
/// (including RBAC) and a scoped <c>finance</c> operator, so the frontend's <c>useAdminCapabilities()</c>
|
||||
/// role-gating is demonstrable — the finance operator's sidebar shows only the money consoles.
|
||||
/// </summary>
|
||||
public static readonly AdminPersona[] Admins =
|
||||
[
|
||||
new AdminPersona("09120000020", "demo_admin_root", "نگار", "مدیری", "female", RoleNames.SuperAdmin),
|
||||
new AdminPersona("09120000021", "demo_admin_finance", "کامران", "مالی", "male", RoleNames.Finance),
|
||||
];
|
||||
|
||||
public static readonly CustomerPersona[] Customers =
|
||||
[
|
||||
new CustomerPersona(
|
||||
@@ -185,6 +199,14 @@ internal sealed record NursePersona(
|
||||
VariantDef[] Variants,
|
||||
AreaDef[] Areas);
|
||||
|
||||
internal sealed record AdminPersona(
|
||||
string Phone,
|
||||
string UserName,
|
||||
string Name,
|
||||
string FamilyName,
|
||||
string Gender,
|
||||
string RoleName);
|
||||
|
||||
internal sealed record CredentialDef(string Type, string IssuingAuthority, string Number);
|
||||
|
||||
internal sealed record BankDef(string BankName, string AccountHolderName, string Iban, bool MatchedNationalId);
|
||||
|
||||
Reference in New Issue
Block a user