Skip to content

bug: "Responsiveness" (trust level) status shown on NGO's own profile — should be coordinator/admin only #792

Description

@nadavosa

Problem

The agent/NGO profile header shows a "Responsiveness" status row (the trustLevel field — i18n key dashboard.agentProfile.trustLevel → "Responsiveness") even when an NGO is viewing their own profile. This is meant to be an internal coordinator/admin-facing metric and shouldn't be visible to NGO users at all.

Looking at src/components/Dashboard/Profile/sections/ProfileHeader/agent/AgentHeader.tsx, the editable TrustLevelDropdown is already correctly gated behind isAuthorized:

<StatusRowField
  title={t("dashboard.agentProfile.trustLevel")}
  extra={
    isAuthorized && (
      <TrustLevelDropdown ... />
    )
  }
/>

But the StatusRowField itself — including its "Responsiveness" title — always renders; only the dropdown content inside extra is conditional. So an unauthorized viewer (an NGO viewing their own profile) still sees the row, just with an empty "–" value, instead of the row being hidden entirely.

Steps to reproduce

  1. Log in as an NGO/agent user
  2. View your own profile
  3. Observe the "Responsiveness" row shows "–", directly above the District row

Expected

The entire "Responsiveness" row should be hidden from NGO self-view — visible only to coordinators/admins. Likely fix: wrap the whole StatusRowField (not just its extra content) in the isAuthorized check.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions