🔍 Security Group Mapping Debug

Current User

ID:

31

Username:

mmbaka@zep-re.com

Role:

SuperAdmin

Category:

SuperAdmin

Organization ID:

1

Permissions:
read:dashboardadd_agentadd_farmeradd_organizationadd_organization_typeadd_pastoralist_groupsadd_permissionadd_policyadd_roleadd_security_groupadd_userapprove_user_registrationbulk_agent_uploadbulk_farmer_uploaddisable_pastoralist_groupsedit_agentsedit_farmeredit_organizationedit_organization_typeedit_pastoralist_groupsedit_permissionedit_policyedit_roleedit_security_groupedit_usersale_insurancesystem_settingsview_activity_logview_agentsview_dashboardview_farmersview_main_siteview_me_dashboardview_organizationview_organization_typesview_pastoralist_groupsview_paymentsview_permissionsview_policiesview_project_dashboardview_reportsview_rolesview_security_groupsview_usersview_complaint
Profile Data:
{
  "id": 31,
  "securityGroupId": 1,
  "name": "MICHAEL MBAKA",
  "email": "mmbaka@zep-re.com",
  "mobile": "254721839383",
  "status": 1,
  "createdAt": 1724737099000,
  "organizationId": 1,
  "serviceProviderId": null,
  "changePassword": 0,
  "countyId": 1,
  "countryId": null,
  "securityGroups": {
    "id": 1,
    "name": "ADMINISTRATOR",
    "permissionList": [
      {
        "id": 39,
        "name": "add_agent",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 1,
        "name": "add_farmer",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 10,
        "name": "add_organization",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 13,
        "name": "add_organization_type",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 32,
        "name": "add_pastoralist_groups",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 22,
        "name": "add_permission",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 30,
        "name": "add_policy",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 16,
        "name": "add_role",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 25,
        "name": "add_security_group",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 19,
        "name": "add_user",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 45,
        "name": "approve_user_registration",
        "status": "1",
        "created_by": null,
        "created_at": 1712235370000
      },
      {
        "id": 40,
        "name": "bulk_agent_upload",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 4,
        "name": "bulk_farmer_upload",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 35,
        "name": "disable_pastoralist_groups",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 42,
        "name": "edit_agents",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 2,
        "name": "edit_farmer",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 11,
        "name": "edit_organization",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 14,
        "name": "edit_organization_type",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 33,
        "name": "edit_pastoralist_groups",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 23,
        "name": "edit_permission",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 29,
        "name": "edit_policy",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 17,
        "name": "edit_role",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 26,
        "name": "edit_security_group",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 20,
        "name": "edit_user",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 31,
        "name": "sale_insurance",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 5,
        "name": "system_settings",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 6,
        "name": "view_activity_log",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 41,
        "name": "view_agents",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 9,
        "name": "view_dashboard",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 3,
        "name": "view_farmers",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 44,
        "name": "view_main_site",
        "status": "1",
        "created_by": null,
        "created_at": 1712234141000
      },
      {
        "id": 8,
        "name": "view_me_dashboard",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 12,
        "name": "view_organization",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 15,
        "name": "view_organization_types",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 34,
        "name": "view_pastoralist_groups",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 46,
        "name": "view_payments",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 24,
        "name": "view_permissions",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 28,
        "name": "view_policies",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 43,
        "name": "view_project_dashboard",
        "status": "1",
        "created_by": null,
        "created_at": 1712234129000
      },
      {
        "id": 7,
        "name": "view_reports",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 18,
        "name": "view_roles",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 27,
        "name": "view_security_groups",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 21,
        "name": "view_users",
        "status": null,
        "created_by": null,
        "created_at": null
      },
      {
        "id": 47,
        "name": "view_complaint",
        "status": null,
        "created_by": null,
        "created_at": null
      }
    ]
  },
  "organization": {
    "id": 1,
    "name": "ZEP-RE",
    "address": "NAIROBI",
    "email": "INFO@ZEP-RE.COM",
    "mobile": "0011",
    "status": 1,
    "earnsCommission": 0,
    "createdAt": 1696855295000,
    "countryId": 1,
    "country": {
      "id": 1,
      "status": 1,
      "name": "KENYA",
      "code": "KEN",
      "createdAt": 1696346717000,
      "currency_id": 1,
      "currency": {
        "id": 1,
        "code": "KES",
        "description": "Kenyan shiiling"
      }
    },
    "organizationType": 1,
    "type": {
      "id": 1,
      "description": "INSURER"
    },
    "contactPersonName": null,
    "contactPersonEmail": null,
    "contactPersonMobile": null,
    "logo": null
  },
  "updateAt": 1726420945000,
  "approvedAt": null,
  "approvedBy": null,
  "approvalRemarks": null
}

Test Security Group Mapping

Mapping Result:

Mapped Role:SuperAdmin
Category:SuperAdmin
Dashboard Route:/dashboard/super-admin

All Security Groups

IDNameDefault RoleOrganization MappingActions
1SUPER ADMINSuperAdminNo
2ADMINISTRATORAdministratorNo
3COUNTRY MANAGERSCountryManagerNo
4COUNTRY MANAGERCountryManagerNo
5AGENTAgentNo
6ORGANIZATION ADMINOrganizationAdminYes
7DESK OFFICERDeskOfficerNo
8PROJECT PARTNERProjectPartnerNo
9M&E SPECIALISTMESpecialistNo
10DATA ANALYSTDataAnalystNo
11FINANCE OFFICERFinanceOfficerNo
12CUSTOMER CARECustomerCareNo
13IT SUPPORT / DEVELOPERITSupportDeveloperNo
14QA / TESTERQATesterNo
15SYSTEM AUDITORSystemAuditorNo
16PRODUCT OWNERProductOwnerNo
17DIGITAL SOLUTIONS LEADDigitalSolutionsLeadNo
18COMPLIANCE / LEGAL ADVISORComplianceLegalAdvisorNo
19AGGREGATOR ADMINAggregatorAdminNo
20DEVELOPMENT PARTNER ADMINDevelopmentPartnerAdminNo
21INSURANCE PROVIDERInsuranceProviderNo
22PAYMENT PARTNERPaymentPartnerNo
23API INTEGRATION PARTNERApiIntegrationPartnerNo
24VET SERVICE PROVIDERVetServiceProviderNo
25DELIVERY / RIDER PARTNERDeliveryRiderPartnerNo
26SERVICE PROVIDERServiceProviderNo
27FARMER / GROUP LEADERFarmerGroupLeaderNo
28GOVERNMENT / REGULATORGovernmentRegulatorNo
29LEGACY FARMERFarmerGroupLeaderNo
30LEGACY ENUMERATORServiceProviderNo
31LEGACY VETVetServiceProviderNo
32LEGACY INSURANCEInsuranceProviderNo
33LEGACY FINANCEPaymentPartnerNo
34LEGACY REGULATORGovernmentRegulatorNo
35LEGACY DIGITALServiceProviderNo

Quick Tests

🔧 Debugging Instructions

  • • Check the "Current User" section to see how your user is currently mapped
  • • Use the "Test Security Group Mapping" to test different combinations
  • • Look at the console logs during login for detailed mapping information
  • • If your user should be SuperAdmin but isn't, check the API response structure
  • • Security Group ID 1 should always map to SuperAdmin regardless of organization type