mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 22:18:12 +00:00
646 lines
33 KiB
TypeScript
646 lines
33 KiB
TypeScript
import {
|
|
IamBaselineSeed,
|
|
SeedApplication,
|
|
SeedOrganizationType,
|
|
SeedPermission,
|
|
SeedPositionType,
|
|
SeedRole,
|
|
SeedRolePermission,
|
|
SettingDefault,
|
|
} from "./iam-seed.types";
|
|
|
|
/**
|
|
* The default IAM baseline: what `IamBaselineSeeder` writes when an app does not
|
|
* override a section via `IamSeedModule.forRoot()`.
|
|
*
|
|
* These rows started as a copy of the seed constants inside
|
|
* `@tria-plc/iamapi-common` (`dist/db/seed/*`) as of 0.7.12, and are owned here
|
|
* now. Nothing is read from that package at runtime, so the apps sharing the
|
|
* `iam` schema stay consistent even while they resolve different versions of it
|
|
* — but a package upgrade will not hand you new IAM permissions either. Diff
|
|
* against `db/seed/role.seed` and `db/seed/org-type.seed` when upgrading.
|
|
*
|
|
* Ids are the package's originals. Keep them: rows in every existing
|
|
* environment already carry them.
|
|
*
|
|
* Deliberately absent, because nothing in EDR reads them: the 11 Addis Ababa
|
|
* sub-city organizations, the TRIA super-admin organization (`is_super_admin` is
|
|
* only used to block edits to that row and hide it from one list query), and the
|
|
* 7 non-IAM Smart Office applications.
|
|
*/
|
|
|
|
/** Applications permissions hang off. Each app seeds its own separately. */
|
|
const APPLICATIONS: SeedApplication[] = [
|
|
{
|
|
id: "019bcb17-5470-7604-8708-7ed04d842b41",
|
|
key: "iam",
|
|
name: { am: "የስማርት ኦፊስ ማንነት እና መዳረሻ አስተዳደር", en: "Smart Office Identity and Access Management" },
|
|
},
|
|
];
|
|
|
|
const ROLES: SeedRole[] = [
|
|
{
|
|
id: "520836ee-dc13-4c08-b572-8eced5bfd309",
|
|
key: "super_admin",
|
|
name: { am: "ዋና ተቆጣጣሪ", en: "Super Admin" },
|
|
},
|
|
{
|
|
id: "b2de1eae-ef93-4e90-8ec9-351f0dd8a6a9",
|
|
key: "organization_admin",
|
|
name: { am: "የመስሪያ ቤት ዋና ተቆጣጣሪ", en: "Organization Admin" },
|
|
},
|
|
{
|
|
id: "b3a9a5b5-9825-4290-8498-c62fb5925acd",
|
|
key: "unit_admin",
|
|
name: { am: "የመስሪያ ቤት ጽሕፈት ቤት ዋና ተቆጣጣሪ", en: "Organization Unit Admin" },
|
|
},
|
|
{
|
|
id: "ffe82427-ab16-4571-913c-553deb1b0f0f",
|
|
key: "guest",
|
|
name: { am: "ተጠቃሚ", en: "Guest" },
|
|
},
|
|
];
|
|
|
|
const PERMISSIONS: SeedPermission[] = [
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000001",
|
|
key: "can:create:role",
|
|
applicationKey: "iam",
|
|
name: { am: "ሚና መፍጠር", en: "Create Role" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000002",
|
|
key: "can:update:role",
|
|
applicationKey: "iam",
|
|
name: { am: "ሚና ማሻሻል", en: "Update Role" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000003",
|
|
key: "can:delete:role",
|
|
applicationKey: "iam",
|
|
name: { am: "ሚና ማጥፋት", en: "Delete Role" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000006",
|
|
key: "can:update:permission",
|
|
applicationKey: "iam",
|
|
name: { am: "ፈቃድ ማሻሻል", en: "Update Permission" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000007",
|
|
key: "can:delete:permission",
|
|
applicationKey: "iam",
|
|
name: { am: "ፈቃድ ማጥፋት", en: "Delete Permission" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000009",
|
|
key: "can:create:role_permission",
|
|
applicationKey: "iam",
|
|
name: { am: "የሚና-ፈቃድ መፍጠር", en: "Create Role-Permission" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000010",
|
|
key: "can:delete:role_permission",
|
|
applicationKey: "iam",
|
|
name: { am: "የሚና-ፈቃድ ማጥፋት", en: "Delete Role-Permission" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000011",
|
|
key: "can:view:role_permission",
|
|
applicationKey: "iam",
|
|
name: { am: "የሚና-ፈቃድ መመልከት", en: "View Role-Permission" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000012",
|
|
key: "can:create:user_role",
|
|
applicationKey: "iam",
|
|
name: { am: "የተጠቃሚ-ሚና መፍጠር", en: "Create User-Role" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000013",
|
|
key: "can:delete:user_role",
|
|
applicationKey: "iam",
|
|
name: { am: "የተጠቃሚ-ሚና ማጥፋት", en: "Delete User-Role" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000014",
|
|
key: "can:view:user_role",
|
|
applicationKey: "iam",
|
|
name: { am: "የተጠቃሚ-ሚና መመልከት", en: "View User-Role" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000015",
|
|
key: "can:create:position_permission",
|
|
applicationKey: "iam",
|
|
name: { am: "የመደብ-ሚና መፍጠር", en: "Create Position-Permission" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000016",
|
|
key: "can:delete:position_permission",
|
|
applicationKey: "iam",
|
|
name: { am: "የመደብ-ሚና ማጥፋት", en: "Delete Position-Permission" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000017",
|
|
key: "can:view:position_permission",
|
|
applicationKey: "iam",
|
|
name: { am: "የመደብ-ሚና መመልከት", en: "View Position-Permission" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000018",
|
|
key: "can:find_all:organization",
|
|
name: { am: "ሁሉንም ድርጅቶች መፈለግ", en: "Find All Organizations" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000019",
|
|
key: "can:update:organization",
|
|
name: { am: "ድርጅት ማሻሻል", en: "Update Organization" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000020",
|
|
key: "can:delete:organization",
|
|
name: { am: "ድርጅት ማጥፋት", en: "Delete Organization" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000021",
|
|
key: "can:create:unit",
|
|
name: { am: "ክፍል መፍጠር", en: "Create Unit" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000022",
|
|
key: "can:update:unit",
|
|
name: { am: "ክፍል ማሻሻል", en: "Update Unit" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000023",
|
|
key: "can:delete:unit",
|
|
name: { am: "ክፍል ማጥፋት", en: "Delete Unit" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000024",
|
|
key: "can:create:default_unit",
|
|
name: { am: "የዩኒት አይነት መፍጠር", en: "Create Default Unit" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000025",
|
|
key: "can:update:default_unit",
|
|
name: { am: "የዩኒት አይነት ማሻሻል", en: "Update Default Unit" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000026",
|
|
key: "can:delete:default_unit",
|
|
name: { am: "የዩኒት አይነት ማጥፋት", en: "Delete Default Unit" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000027",
|
|
key: "can:create:default_position",
|
|
name: { am: "የስራ መደብ አይነት መፍጠር", en: "Create Default Position" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000028",
|
|
key: "can:update:default_position",
|
|
name: { am: "የስራ መደብ አይነት ማሻሻል", en: "Update Default Position" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000029",
|
|
key: "can:delete:default_position",
|
|
name: { am: "የስራ መደብ አይነት ማጥፋት", en: "Delete Default Position" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000030",
|
|
key: "can:create:organization_type",
|
|
name: { am: "የድርጅት አይነት መፍጠር", en: "Create Organization Type" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000031",
|
|
key: "can:update:organization_type",
|
|
name: { am: "የድርጅት አይነት ማሻሻል", en: "Update Organization Type" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000032",
|
|
key: "can:delete:organization_type",
|
|
name: { am: "የድርጅት አይነት ማጥፋት", en: "Delete Organization Type" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000033",
|
|
key: "can:create:location_type",
|
|
name: { am: "የአካባቢ አይነት መፍጠር", en: "Create Location Type" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000034",
|
|
key: "can:update:location_type",
|
|
name: { am: "የአካባቢ አይነት ማሻሻል", en: "Update Location Type" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000035",
|
|
key: "can:delete:location_type",
|
|
name: { am: "የአካባቢ አይነት ማጥፋት", en: "Delete Location Type" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000036",
|
|
key: "can:create:location",
|
|
name: { am: "አካባቢ መፍጠር", en: "Create Location" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000037",
|
|
key: "can:update:location",
|
|
name: { am: "አካባቢ ማሻሻል", en: "Update Location" },
|
|
},
|
|
{
|
|
id: "019b5993-0000-0000-0000-000000000038",
|
|
key: "can:delete:location",
|
|
name: { am: "አካባቢ ማጥፋት", en: "Delete Location" },
|
|
},
|
|
{
|
|
id: "a9a7c0fa-e4fc-4c0e-b1c2-f74f9da40421",
|
|
key: "create:organization",
|
|
applicationKey: "iam",
|
|
name: { am: "የመስሪያ ቤት መፍጠር", en: "Create Organization" },
|
|
},
|
|
{
|
|
id: "c807691b-2693-4079-9dc5-1e080b67006c",
|
|
key: "activate:organization",
|
|
applicationKey: "iam",
|
|
name: { am: "የመስሪያ ቤት አስተካክል", en: "Activate Organization" },
|
|
},
|
|
{
|
|
id: "457a3659-ed96-456a-a6a1-2881226a86ed",
|
|
key: "can:debarOrganization",
|
|
applicationKey: "iam",
|
|
name: { am: "መቼት መቆጣጠር ይችላል", en: "Debar Organization" },
|
|
},
|
|
{
|
|
id: "2cd9e3c5-bd41-48f3-a849-f497b18b2906",
|
|
key: "manage:organizationAdmin",
|
|
applicationKey: "iam",
|
|
name: { am: "መቼት መቆጣጠር ይችላል", en: "Manage Organization Admin" },
|
|
},
|
|
{
|
|
id: "257d8c6e-ef30-4510-892f-d4a2ad4c814d",
|
|
key: "manage:unitAdmin",
|
|
applicationKey: "iam",
|
|
name: { am: "የጽሕፈት ቤት መቼት መቆጣጠር ይችላል", en: "Manage Unit Admin" },
|
|
},
|
|
{
|
|
id: "4052b7b8-e9f6-4bfe-9b93-eb59f9e4e576",
|
|
key: "can:createEmployee",
|
|
applicationKey: "iam",
|
|
name: { am: "ሰራተኞችን መመደብ/መፍጠር ይችላሉ", en: "Can create employees" },
|
|
},
|
|
{
|
|
id: "965ec76d-bbdb-47a1-a916-07c52f609fa7",
|
|
key: "can:deactivateEmployee",
|
|
applicationKey: "iam",
|
|
name: { am: "ሰራተኞችን ማባረር ይችላሉ", en: "Can deactivate employees" },
|
|
},
|
|
{
|
|
id: "019cbdc6-3d7a-73aa-ac57-51436dfa50e9",
|
|
key: "can:activateEmployee",
|
|
applicationKey: "iam",
|
|
name: { am: "ሰራተኞችን መቀበል ይችላሉ", en: "Can activate employees" },
|
|
},
|
|
{
|
|
id: "ebd8cf49-243d-4887-b2c9-cbe61e86a17a",
|
|
key: "can:uploadUserCSV",
|
|
applicationKey: "iam",
|
|
name: { am: "የሰራተኞችን መረጃ መጫን ይችላል", en: "Can Upload User CSV" },
|
|
},
|
|
{
|
|
id: "68bebc03-c1a8-832f-ae5a-b66553e6bcef",
|
|
key: "can:exportUnitUsers",
|
|
applicationKey: "iam",
|
|
name: { am: "የተቀጣሪዎችን መረጃ ማውጣት ይችላሉ", en: "Can Export Unit Users" },
|
|
},
|
|
{
|
|
id: "c2566286-248e-4cb4-923d-b113d6a5d4ba",
|
|
key: "can:changeUsersProfile",
|
|
applicationKey: "iam",
|
|
name: { am: "ተጠቃሚዎች መግለጫ መቀየር ይችላል", en: "Can Change Users Profile" },
|
|
},
|
|
{
|
|
id: "14f438c6-9295-44a0-a4f3-4ac9855efc37",
|
|
key: "can:activateUser",
|
|
applicationKey: "iam",
|
|
name: { am: "ተጠቃሚዎችን መቆጣጠር ይችላል", en: "Can Activate/Deactivate User" },
|
|
},
|
|
{
|
|
id: "31a39f88-47c0-4322-80ef-f397a6791ff2",
|
|
key: "can:approveNewUser",
|
|
applicationKey: "iam",
|
|
name: { am: "አዲስ ተመዝጋቢ ማፅደቅ ይችላል", en: "Can Approve New User" },
|
|
},
|
|
{
|
|
id: "69694936-8b54-8330-b176-16ffc98c33a7",
|
|
key: "can:viewAllUsers",
|
|
applicationKey: "iam",
|
|
name: { am: "ሁሉንም ተጠቃሚዎች ማየት ይችላል", en: "Can View All Users" },
|
|
},
|
|
{
|
|
id: "68f1017f-4c60-8322-984d-e4317986e641",
|
|
key: "can:manageUsersAccountConfiguration",
|
|
applicationKey: "iam",
|
|
name: { am: "የተጠቃሚ መለያ አዋቂነት መቆጣጠር ይችላል", en: "Can Manage Users Account Configuration" },
|
|
},
|
|
{
|
|
id: "fceaa4c5-621f-45ce-b5a7-0ffc9e366fe1",
|
|
key: "can:setUserRequirementDocument",
|
|
applicationKey: "iam",
|
|
name: { am: "ተመዝጋቢዎች የሚያስገቡትን መረጃ መቆጣጠር ይችላል", en: "Can Set User Requirement Document" },
|
|
},
|
|
];
|
|
|
|
/**
|
|
* Role → permission-key grants, applied additively: only missing pairs are
|
|
* inserted, so grants made through the IAM UI survive a reseed.
|
|
*/
|
|
const ROLE_PERMISSIONS: SeedRolePermission[] = [
|
|
{
|
|
roleKey: "super_admin",
|
|
permissionKeys: [
|
|
"can:create:role",
|
|
"can:update:role",
|
|
"can:delete:role",
|
|
"can:update:permission",
|
|
"can:delete:permission",
|
|
"can:create:role_permission",
|
|
"can:delete:role_permission",
|
|
"can:view:role_permission",
|
|
"can:create:user_role",
|
|
"can:delete:user_role",
|
|
"can:view:user_role",
|
|
"can:create:position_permission",
|
|
"can:delete:position_permission",
|
|
"can:view:position_permission",
|
|
"can:find_all:organization",
|
|
"can:update:organization",
|
|
"can:delete:organization",
|
|
"can:create:unit",
|
|
"can:update:unit",
|
|
"can:delete:unit",
|
|
"can:create:default_unit",
|
|
"can:update:default_unit",
|
|
"can:delete:default_unit",
|
|
"can:create:default_position",
|
|
"can:update:default_position",
|
|
"can:delete:default_position",
|
|
"can:create:organization_type",
|
|
"can:update:organization_type",
|
|
"can:delete:organization_type",
|
|
"can:create:location_type",
|
|
"can:update:location_type",
|
|
"can:delete:location_type",
|
|
"create:organization",
|
|
"activate:organization",
|
|
"can:debarOrganization",
|
|
"manage:organizationAdmin",
|
|
"manage:unitAdmin",
|
|
"can:activateUser",
|
|
"can:approveNewUser",
|
|
"can:viewAllUsers",
|
|
"can:setUserRequirementDocument",
|
|
"can:create:location",
|
|
"can:update:location",
|
|
"can:delete:location",
|
|
],
|
|
},
|
|
{
|
|
roleKey: "organization_admin",
|
|
permissionKeys: [
|
|
"can:uploadUserCSV",
|
|
"can:changeUsersProfile",
|
|
"can:createEmployee",
|
|
"can:deactivateEmployee",
|
|
"can:exportUnitUsers",
|
|
"can:create:position_permission",
|
|
"can:delete:position_permission",
|
|
"can:view:position_permission",
|
|
"can:create:unit",
|
|
"can:update:unit",
|
|
"can:delete:unit",
|
|
"manage:unitAdmin",
|
|
],
|
|
},
|
|
{
|
|
roleKey: "unit_admin",
|
|
permissionKeys: [
|
|
"can:uploadUserCSV",
|
|
"can:createEmployee",
|
|
"can:exportUnitUsers",
|
|
"can:changeUsersProfile",
|
|
"can:deactivateEmployee",
|
|
"can:manageUsersAccountConfiguration",
|
|
"can:create:position_permission",
|
|
"can:delete:position_permission",
|
|
"can:view:position_permission",
|
|
"can:create:unit",
|
|
"can:update:unit",
|
|
"can:delete:unit",
|
|
],
|
|
},
|
|
{
|
|
roleKey: "guest",
|
|
permissionKeys: [
|
|
|
|
],
|
|
},
|
|
];
|
|
|
|
const POSITION_TYPES: SeedPositionType[] = [
|
|
{
|
|
id: "457a3659-ed96-456a-a6a1-2881226a86ec",
|
|
key: "employee",
|
|
isSystem: true,
|
|
name: { am: "ባለሙያ", en: "Employee" },
|
|
},
|
|
{
|
|
id: "34a7f69c-3f30-47a0-81c3-fcfc3087e456",
|
|
key: "teamLeader",
|
|
isSystem: true,
|
|
name: { am: "ቡድን መሪ", en: "Team Leader" },
|
|
},
|
|
{
|
|
id: "2cd9e3c5-bd41-48f3-a849-f497b18b2905",
|
|
key: "director",
|
|
isSystem: true,
|
|
name: { am: "ዳይሬክተር", en: "Director" },
|
|
},
|
|
{
|
|
id: "db310acf-7a78-40a3-83c7-9a9e9e6d1fc7",
|
|
key: "deputy",
|
|
isSystem: true,
|
|
name: { am: "ዘርፍ ኃላፊ", en: "Deputy" },
|
|
},
|
|
{
|
|
id: "1a4b4d40-e4fc-4f38-99a6-f81dc5fcff23",
|
|
key: "officeHead",
|
|
isSystem: true,
|
|
name: { am: "ቢሮ ኃላፊ", en: "Office Head" },
|
|
},
|
|
{
|
|
id: "83bc6cd3-119e-4a41-917c-c763fb3fd013",
|
|
key: "recordOfficer",
|
|
isSystem: true,
|
|
name: { am: "መዝገብ ቤት", en: "Record Officer" },
|
|
},
|
|
];
|
|
|
|
/**
|
|
* Organization types and the units an organization of that type is created
|
|
* with. Both are read at runtime, which is why they are seeded: the New
|
|
* Organization form posts `organizationTypeId`, and
|
|
* `createOrganizationWithStructure` builds the new org's units from
|
|
* `default_units`.
|
|
*/
|
|
const ORGANIZATION_TYPES: SeedOrganizationType[] = [
|
|
{
|
|
key: "woreda",
|
|
name: { am: "ወረዳ", en: "Woreda" },
|
|
defaultUnits: [
|
|
{ key: "ዋና ስራ አስፈጻሚ ጽ/ቤት", description: "ዋና ስራ አስፈጻሚ ጽ/ቤት", name: { am: "ዋና ስራ አስፈጻሚ ጽ/ቤት", en: "Chief Executive Office" } },
|
|
{ key: "አስተዳደርና ፋይናንስ ጽ/ቤት", description: "አስተዳደርና ፋይናንስ ጽ/ቤት", name: { am: "አስተዳደርና ፋይናንስ ጽ/ቤት", en: "Administration and Finance Office" } },
|
|
{ key: "ፋይናንስ ፅህፈት ቤት", description: "ፋይናንስ ፅህፈት ቤት", name: { am: "ፋይናንስ ፅህፈት ቤት", en: "Finance Office" } },
|
|
{ key: "ምክር ቤት ጽ/ቤት", description: "ምክር ቤት ጽ/ቤት", name: { am: "ምክር ቤት ጽ/ቤት", en: "Council Office" } },
|
|
{ key: "አቃቤ ህግ ጽ/ቤት", description: "አቃቤ ህግ ጽ/ቤት", name: { am: "አቃቤ ህግ ጽ/ቤት", en: "Prosecutor's Office" } },
|
|
{ key: "ሰላምና ፀጥታ ጽ/ቤት", description: "ሰላምና ፀጥታ ጽ/ቤት", name: { am: "ሰላምና ፀጥታ ጽ/ቤት", en: "Peace and Security Office" } },
|
|
{ key: "ደንብ ማስከበር ጽ/ቤት", description: "ደንብ ማስከበር ጽ/ቤት", name: { am: "ደንብ ማስከበር ጽ/ቤት", en: "Enforcement Office" } },
|
|
{ key: "ፕላንና ልማት ኮሚሽን ጽ/ቤት", description: "ፕላንና ልማት ኮሚሽን ጽ/ቤት", name: { am: "ፕላንና ልማት ኮሚሽን ጽ/ቤት", en: "Planning and Development Commission Office" } },
|
|
{ key: "ህብረት ስራ ጽ/ቤት", description: "ህብረት ስራ ጽ/ቤት", name: { am: "ህብረት ስራ ጽ/ቤት", en: "Cooperative Office" } },
|
|
{ key: "የንግድ ፅ/ቤት", description: "የንግድ ፅ/ቤት", name: { am: "የንግድ ፅ/ቤት", en: "Business Office" } },
|
|
{ key: "የአ/ አና ከተማ ግብርና ጽ/ቤት", description: "የአ/ አና ከተማ ግብርና ጽ/ቤት", name: { am: "የአ/ አና ከተማ ግብርና ጽ/ቤት", en: "Rural and Urban Agriculture Office" } },
|
|
{ key: "የመሬት ልማትና አስተዳደር ጽ/ቤት", description: "የመሬት ልማትና አስተዳደር ጽ/ቤት", name: { am: "የመሬት ልማትና አስተዳደር ጽ/ቤት", en: "Land Development and Administration Office" } },
|
|
{ key: "ደረቅ ቆሻሻ ጽ/ቤት", description: "ደረቅ ቆሻሻ ጽ/ቤት", name: { am: "ደረቅ ቆሻሻ ጽ/ቤት", en: "Solid waste office" } },
|
|
{ key: "አካባቢ ጥበቃ ጽ/ቤት", description: "አካባቢ ጥበቃ ጽ/ቤት", name: { am: "አካባቢ ጥበቃ ጽ/ቤት", en: "Environmental Protection Office" } },
|
|
{ key: "የከተማ ውበትና አረንጓዴ ልማት ጽ/ቤት", description: "የከተማ ውበትና አረንጓዴ ልማት ጽ/ቤት", name: { am: "የከተማ ውበትና አረንጓዴ ልማት ጽ/ቤት", en: "Urban Beautification and Green Development Office" } },
|
|
{ key: "ፐብሊክ ሰርቪስ የሰዉ ሀብት አስተዳደር", description: "ፐብሊክ ሰርቪስ የሰዉ ሀብት አስተዳደር", name: { am: "ፐብሊክ ሰርቪስ የሰዉ ሀብት አስተዳደር", en: "Public Service Human Resource Management" } },
|
|
{ key: "መንግስት ህንጻ ጽ/ቤት", description: "መንግስት ህንጻ ጽ/ቤት", name: { am: "መንግስት ህንጻ ጽ/ቤት", en: "Government Building Office" } },
|
|
{ key: "ባህልና ቱሪዝም ጽ/ቤት", description: "ባህልና ቱሪዝም ጽ/ቤት", name: { am: "ባህልና ቱሪዝም ጽ/ቤት", en: "Culture and Tourism Office" } },
|
|
{ key: "ጤና ጽ/ቤት", description: "ጤና ጽ/ቤት", name: { am: "ጤና ጽ/ቤት", en: "Health Office" } },
|
|
{ key: "ኮሚኒኬሽን ጽ/ቤት", description: "ኮሚኒኬሽን ጽ/ቤት", name: { am: "ኮሚኒኬሽን ጽ/ቤት", en: "Communication Office" } },
|
|
{ key: "ትምህርት ጽ/ቤት", description: "ትምህርት ጽ/ቤት", name: { am: "ትምህርት ጽ/ቤት", en: "Education Office" } },
|
|
{ key: "ሴቶችህጻናትና ማህበራዊ", description: "ሴቶችህጻናትና ማህበራዊ", name: { am: "ሴቶችህጻናትና ማህበራዊ", en: "Women, Children and Social Affairs Office" } },
|
|
{ key: "ዲዛይንና ግንባታ ስራዎች ጽ/ቤት", description: "ዲዛይንና ግንባታ ስራዎች ጽ/ቤት", name: { am: "ዲዛይንና ግንባታ ስራዎች ጽ/ቤት", en: "Design and Construction Works Office" } },
|
|
{ key: "የግንባታ ፈቃድና ቁጥጥር ጽ/ቤት", description: "የግንባታ ፈቃድና ቁጥጥር ጽ/ቤት", name: { am: "የግንባታ ፈቃድና ቁጥጥር ጽ/ቤት", en: "Construction Permit and Supervision Office" } },
|
|
{ key: "የቤቶች አስተዳደር ጽ/ቤት", description: "የቤቶች አስተዳደር ጽ/ቤት", name: { am: "የቤቶች አስተዳደር ጽ/ቤት", en: "Housing Management Office" } },
|
|
{ key: "የወጣቶችና ስፖርት ጽ/ቤት", description: "የወጣቶችና ስፖርት ጽ/ቤት", name: { am: "የወጣቶችና ስፖርት ጽ/ቤት", en: "Youth and Sports Office" } },
|
|
{ key: "የህብረተሰብ ተሳትፎና በጎ ፈቃድ ማስተባበሪያ ጽ/ቤት", description: "የህብረተሰብ ተሳትፎና በጎ ፈቃድ ማስተባበሪያ ጽ/ቤት", name: { am: "የህብረተሰብ ተሳትፎና በጎ ፈቃድ ማስተባበሪያ ጽ/ቤት", en: "Community Participation and Charity Coordination Office" } },
|
|
{ key: "የኢኖቬሽንና ቴክኖሎጂ ልማት ጽ/ቤት", description: "የኢኖቬሽንና ቴክኖሎጂ ልማት ጽ/ቤት", name: { am: "የኢኖቬሽንና ቴክኖሎጂ ልማት ጽ/ቤት", en: "Innovation and Technology Development Office" } },
|
|
{ key: "የቴክኒክና ሙያ ጽ/ቤት", description: "የቴክኒክና ሙያ ጽ/ቤት", name: { am: "የቴክኒክና ሙያ ጽ/ቤት", en: "Technical and Vocational Office" } },
|
|
{ key: "የስራ ኢን/ኢንዱስትሪ ልማት ጽ/ቤት", description: "የስራ ኢን/ኢንዱስትሪ ልማት ጽ/ቤት", name: { am: "የስራ ኢን/ኢንዱስትሪ ልማት ጽ/ቤት", en: "Employment and Industry Development Office" } },
|
|
{ key: "የስራና ክህሎት ጽ/ቤት", description: "የስራና ክህሎት ጽ/ቤት", name: { am: "የስራና ክህሎት ጽ/ቤት", en: "Labor and Skills Office" } },
|
|
{ key: "ኢንዱስትሪ ልማት ጽ/ቤት", description: "ኢንዱስትሪ ልማት ጽ/ቤት", name: { am: "ኢንዱስትሪ ልማት ጽ/ቤት", en: "Industry Development Office" } },
|
|
],
|
|
},
|
|
{
|
|
key: "subcity",
|
|
name: { am: "ክፍለ ከተማ", en: "Sub City" },
|
|
defaultUnits: [
|
|
{ key: "ዋና ስራ አስፈጻሚ ጽ/ቤት", description: "ዋና ስራ አስፈጻሚ ጽ/ቤት", name: { am: "ዋና ስራ አስፈጻሚ ጽ/ቤት", en: "Main Executive Office" } },
|
|
{ key: "አስተዳደርና ፋይናንስ ጽ/ቤት", description: "አስተዳደርና ፋይናንስ ጽ/ቤት", name: { am: "አስተዳደርና ፋይናንስ ጽ/ቤት", en: "Administration and Finance Office" } },
|
|
{ key: "ፋይናንስ ፅህፈት ቤት", description: "ፋይናንስ ፅህፈት ቤት", name: { am: "ፋይናንስ ፅህፈት ቤት", en: "Finance Office" } },
|
|
{ key: "ምክር ቤት ጽ/ቤት", description: "ምክር ቤት ጽ/ቤት", name: { am: "ምክር ቤት ጽ/ቤት", en: "Council Office" } },
|
|
{ key: "አቃቤ ህግ ጽ/ቤት", description: "አቃቤ ህግ ጽ/ቤት", name: { am: "አቃቤ ህግ ጽ/ቤት", en: "Legal Affairs Office" } },
|
|
{ key: "ሰላምና ፀጥታ ጽ/ቤት", description: "ሰላምና ፀጥታ ጽ/ቤት", name: { am: "ሰላምና ፀጥታ ጽ/ቤት", en: "Peace and Security Office" } },
|
|
{ key: "ደንብ ማስከበር ጽ/ቤት", description: "ደንብ ማስከበር ጽ/ቤት", name: { am: "ደንብ ማስከበር ጽ/ቤት", en: "Regulations Enforcement Office" } },
|
|
{ key: "ፕላንና ልማት ኮሚሽን ጽ/ቤት", description: "ፕላንና ልማት ኮሚሽን ጽ/ቤት", name: { am: "ፕላንና ልማት ኮሚሽን ጽ/ቤት", en: "Planning and Development Commission Office" } },
|
|
{ key: "ህብረት ስራ ጽ/ቤት", description: "ህብረት ስራ ጽ/ቤት", name: { am: "ህብረት ስራ ጽ/ቤት", en: "Community Work Office" } },
|
|
{ key: "የንግድ ፅ/ቤት", description: "የንግድ ፅ/ቤት", name: { am: "የንግድ ፅ/ቤት", en: "Trade Office" } },
|
|
{ key: "የአ/ አና ከተማ ግብርና ጽ/ቤት", description: "የአ/ አና ከተማ ግብርና ጽ/ቤት", name: { am: "የአ/ አና ከተማ ግብርና ጽ/ቤት", en: "Rural and Urban Agriculture Office" } },
|
|
{ key: "የመሬት ልማትና አስተዳደር ጽ/ቤት", description: "የመሬት ልማትና አስተዳደር ጽ/ቤት", name: { am: "የመሬት ልማትና አስተዳደር ጽ/ቤት", en: "Land Development and Administration Office" } },
|
|
{ key: "ደረቅ ቆሻሻ ጽ/ቤት", description: "ደረቅ ቆሻሻ ጽ/ቤት", name: { am: "ደረቅ ቆሻሻ ጽ/ቤት", en: "Solid Waste Management Office" } },
|
|
{ key: "አካባቢ ጥበቃ ጽ/ቤት", description: "አካባቢ ጥበቃ ጽ/ቤት", name: { am: "አካባቢ ጥበቃ ጽ/ቤት", en: "Environmental Protection Office" } },
|
|
{ key: "የከተማ ውበትና አረንጓዴ ልማት ጽ/ቤት", description: "የከተማ ውበትና አረንጓዴ ልማት ጽ/ቤት", name: { am: "የከተማ ውበትና አረንጓዴ ልማት ጽ/ቤት", en: "Urban Beautification and Green Development Office" } },
|
|
{ key: "ፐብሊክ ሰርቪስ የሰዉ ሀብት አስተዳደር", description: "ፐብሊክ ሰርቪስ የሰዉ ሀብት አስተዳደር", name: { am: "ፐብሊክ ሰርቪስ የሰዉ ሀብት አስተዳደር", en: "Public Service and Human Resource Management" } },
|
|
{ key: "መንግስት ህንጻ ጽ/ቤት", description: "መንግስት ህንጻ ጽ/ቤት", name: { am: "መንግስት ህንጻ ጽ/ቤት", en: "Public Buildings Office" } },
|
|
{ key: "ባህልና ቱሪዝም ጽ/ቤት", description: "ባህልና ቱሪዝም ጽ/ቤት", name: { am: "ባህልና ቱሪዝም ጽ/ቤት", en: "Culture and Tourism Office" } },
|
|
{ key: "ጤና ጽ/ቤት", description: "ጤና ጽ/ቤት", name: { am: "ጤና ጽ/ቤት", en: "Health Office" } },
|
|
{ key: "ኮሚኒኬሽን ጽ/ቤት", description: "ኮሚኒኬሽን ጽ/ቤት", name: { am: "ኮሚኒኬሽን ጽ/ቤት", en: "Communication Office" } },
|
|
{ key: "ትምህርት ጽ/ቤት", description: "ትምህርት ጽ/ቤት", name: { am: "ትምህርት ጽ/ቤት", en: "Education Office" } },
|
|
{ key: "ሴቶችህጻናትና ማህበራዊ", description: "ሴቶችህጻናትና ማህበራዊ", name: { am: "ሴቶችህጻናትና ማህበራዊ", en: "Women, Children and Social Affairs Office" } },
|
|
{ key: "ዲዛይንና ግንባታ ስራዎች ጽ/ቤት", description: "ዲዛይንና ግንባታ ስራዎች ጽ/ቤት", name: { am: "ዲዛይንና ግንባታ ስራዎች ጽ/ቤት", en: "Design and Construction Works Office" } },
|
|
{ key: "የግንባታ ፈቃድና ቁጥጥር ጽ/ቤት", description: "የግንባታ ፈቃድና ቁጥጥር ጽ/ቤት", name: { am: "የግንባታ ፈቃድና ቁጥጥር ጽ/ቤት", en: "Construction Permit and Control Office" } },
|
|
{ key: "የቤቶች አስተዳደር ጽ/ቤት", description: "የቤቶች አስተዳደር ጽ/ቤት", name: { am: "የቤቶች አስተዳደር ጽ/ቤት", en: "Housing Management Office" } },
|
|
{ key: "የወጣቶችና ስፖርት ጽ/ቤት", description: "የወጣቶችና ስፖርት ጽ/ቤት", name: { am: "የወጣቶችና ስፖርት ጽ/ቤት", en: "Youth and Sports Office" } },
|
|
{ key: "የህብረተሰብ ተሳትፎና በጎ ፈቃድ ማስተባበሪያ ጽ/ቤት", description: "የህብረተሰብ ተሳትፎና በጎ ፈቃድ ማስተባበሪያ ጽ/ቤት", name: { am: "የህብረተሰብ ተሳትፎና በጎ ፈቃድ ማስተባበሪያ ጽ/ቤት", en: "Community Participation and Voluntarism Coordination Office" } },
|
|
{ key: "የኢኖቬሽንና ቴክኖሎጂ ልማት ጽ/ቤት", description: "የኢኖቬሽንና ቴክኖሎጂ ልማት ጽ/ቤት", name: { am: "የኢኖቬሽንና ቴክኖሎጂ ልማት ጽ/ቤት", en: "Innovation and Technology Development Office" } },
|
|
{ key: "የቴክኒክና ሙያ ጽ/ቤት", description: "የቴክኒክና ሙያ ጽ/ቤት", name: { am: "የቴክኒክና ሙያ ጽ/ቤት", en: "Technical and Vocational Office" } },
|
|
{ key: "የስራ ኢን/ኢንዱስትሪ ልማት ጽ/ቤት", description: "የስራ ኢን/ኢንዱስትሪ ልማት ጽ/ቤት", name: { am: "የስራ ኢን/ኢንዱስትሪ ልማት ጽ/ቤት", en: "Labor and Industry Development Office" } },
|
|
{ key: "የስራና ክህሎት ጽ/ቤት", description: "የስራና ክህሎት ጽ/ቤት", name: { am: "የስራና ክህሎት ጽ/ቤት", en: "Labor and Skills Office" } },
|
|
{ key: "ኢንዱስትሪ ልማት ጽ/ቤት", description: "ኢንዱስትሪ ልማት ጽ/ቤት", name: { am: "ኢንዱስትሪ ልማት ጽ/ቤት", en: "Industry Development Office" } },
|
|
],
|
|
},
|
|
{
|
|
key: "office",
|
|
name: { am: "ቢሮ", en: "Bureau" },
|
|
defaultUnits: [
|
|
{ key: "ቢሮ", description: "ቢሮ", name: { am: "ቢሮ", en: "Bureau" } },
|
|
],
|
|
},
|
|
{
|
|
key: "branch",
|
|
name: { am: "ቅርንጫፍ", en: "Branch" },
|
|
defaultUnits: [
|
|
|
|
],
|
|
},
|
|
];
|
|
|
|
/** Seeded once per organization. All start unset; the IAM UI fills them in. */
|
|
const ORGANIZATION_SETTINGS: SettingDefault[] = [
|
|
{ key: "logoFileUrl", displayName: "Logo", type: "file" },
|
|
{ key: "faviconFileUrl", displayName: "Favicon", type: "file" },
|
|
{ key: "loginBackgroundFileUrl", displayName: "Login Background", type: "file" },
|
|
{ key: "stampImageFileUrl", displayName: "Stamp Image", type: "file" },
|
|
{ key: "customCssFileUrl", displayName: "Custom CSS", type: "file" },
|
|
{ key: "primaryColor", displayName: "Primary Color", type: "value" },
|
|
{ key: "secondaryColor", displayName: "Secondary Color", type: "value" },
|
|
{ key: "accentColor", displayName: "Accent Color", type: "value" },
|
|
{ key: "loginTitle", displayName: "Login Title", type: "value" },
|
|
{ key: "loginSubtitle", displayName: "Login Subtitle", type: "value" },
|
|
{ key: "sidebarColor", displayName: "Sidebar Color", type: "value" },
|
|
{ key: "headerColor", displayName: "Header Color", type: "value" },
|
|
{ key: "stampText", displayName: "Stamp Text", type: "value" },
|
|
{ key: "footerText", displayName: "Footer Text", type: "value" },
|
|
{ key: "supportEmail", displayName: "Support Email", type: "value" },
|
|
{ key: "supportPhone", displayName: "Support Phone", type: "value" },
|
|
];
|
|
|
|
/** Seeded once per unit. */
|
|
const UNIT_SETTINGS: SettingDefault[] = [
|
|
{ key: "isMultipleDelegationAllowed", displayName: "Is Multiple Delegation Allowed", type: "value" },
|
|
{ key: "internalSuffix", displayName: "Internal Suffix", type: "value" },
|
|
{ key: "internalPrefix", displayName: "Internal Prefix", type: "value" },
|
|
{ key: "internalSuffixCC", displayName: "Internal Suffix CC", type: "value" },
|
|
{ key: "internalPrefixCC", displayName: "Internal Prefix CC", type: "value" },
|
|
{ key: "referenceNumberPrefix", displayName: "Reference Number Prefix", type: "value" },
|
|
{ key: "externalReferenceNumberPrefix", displayName: "External Reference Number Prefix", type: "value" },
|
|
{ key: "internalMemoReferenceNumberPrefix", displayName: "Internal Memo Reference Number Prefix", type: "value" },
|
|
{ key: "escalationHour", displayName: "Escalation Hour", type: "value" },
|
|
{ key: "urgentLetterEscalationHour", displayName: "Urgent Letter Escalation Hour", type: "value" },
|
|
{ key: "onReviewLetterEscalationHour", displayName: "On Review Letter Escalation Hour", type: "value" },
|
|
{ key: "urgentOnReviewLetterEscalationHour", displayName: "Urgent On Review Letter Escalation Hour", type: "value" },
|
|
{ key: "shouldCollaboratorAlwaysSign", displayName: "Should Collaborator Always Sign", type: "value" },
|
|
{ key: "waitAllCollaboratorsBeforeAction", displayName: "Wait All Collaborators Before Action", type: "value" },
|
|
{ key: "shouldIncludeForYourReferenceInCC", displayName: "Should Include For Your Reference In CC", type: "value" },
|
|
{ key: "forwardWithTeeterSignature", displayName: "Forward With Teeter Signature", type: "value" },
|
|
{ key: "attachSignatureOnAttachment", displayName: "Attach Signature On Attachment", type: "value" },
|
|
{ key: "positionScopeToFetch", displayName: "Position Scope To Fetch", type: "value" },
|
|
];
|
|
|
|
/**
|
|
* Defaults for every section except `superAdmin`, which has no sensible default
|
|
* — the account has to be attached to an organization only the consuming app
|
|
* knows about.
|
|
*/
|
|
export const DEFAULT_IAM_BASELINE_SEED: IamBaselineSeed = {
|
|
applications: APPLICATIONS,
|
|
roles: ROLES,
|
|
permissions: PERMISSIONS,
|
|
rolePermissions: ROLE_PERMISSIONS,
|
|
positionTypes: POSITION_TYPES,
|
|
positionTypePermissions: [],
|
|
organizationTypes: ORGANIZATION_TYPES,
|
|
organizationSettings: ORGANIZATION_SETTINGS,
|
|
unitSettings: UNIT_SETTINGS,
|
|
superAdmin: null,
|
|
};
|