fleetdm / fleet

Open-source platform for IT, security, and infrastructure teams. (Linux, macOS, Chrome, Windows, cloud, data center)
https://fleetdm.com
Other
3.08k stars 425 forks source link

Backend sort for priority of user in the 'Used by' host details display #9601

Open zayhanlon opened 1 year ago

zayhanlon commented 1 year ago

User story

As an IT administrator, when troubleshooting an issue I want to be able to easily identify the end user that I should work with (not easily identifiable when multiple chrome profiles, sometimes personal emails are selected as primary).

-backend sorting by priority (1-2 pts)

Requirements

There should be a drop down selector in the 'used by' field on the host details page where administrators are able to 'set' or 'select' one as primary rather than Fleet deciding the primary.

OR

Within settings, allow administrators to set a 'work email domain' which would be auto-selected as the primary by Fleet when multiple chrome profiles are detected.

Design

UI

TODO?

CLI usage

TODO?

Compatibility

REST API changes

TODO?

Database schema migrations

TODO?

Technical sub-tasks (if any)

N/A

RachelElysia commented 1 year ago

@zayhanlon A backend change is needed for this because there is no primary email stored.

Currently the /hosts/{id}/device_mapping only returns profiles like this:

  "host_id": 200,
  "device_mapping": [
    {
      "email": "user0@example.com",
      "source": "google_chrome_profiles"
    },
    {
      "email": "user1@example.com",
      "source": "google_chrome_profiles"
    },
    {
      "email": "user2@example9.com",
      "source": "google_chrome_profiles"
    }
  ]
}

There is no key to specify the primary user email.

To make this request happen:

  1. The backend needs to change the device_mapping endpoint to allow posting to this endpoint with an optional key like primary: true in the database. Backend can architect if this is the best approach.
  2. Design needs to design what this looks like in the UI (a dropdown or modal or something to set the primary email)
  3. Then frontend can make the UI changes when the API allows for it and the UI is designed.
zayhanlon commented 1 year ago

https://www.figma.com/file/hdALBDsrti77QuDNSzLdkx/%F0%9F%9A%A7-Fleet-EE-(dev-ready%2C-scratchpad)?node-id=12991%3A334558&t=uzqNCtma4dy5LTfr-0

@RachelElysia Here's the design^ I'm so sorry, I somehow missed including the design link for so many of these.

Mike's vision was that the primary would be auto-determined by the @domain.com of any admin users in the platform. Is this possible?

RachelElysia commented 1 year ago

@zayhanlon So we're not storing the specific email anywhere in the API/database? I'm worried if we do the logic on the frontend only, it's going to slow down the manage host table. I can do it, but just a consideration if it's not being stored somewhere.

zayhanlon commented 1 year ago

-backend sorting by priority (1-2 pts) -frontend always display first in the list (0.5 pt)

pintomi1989 commented 4 months ago

Update: This would still be nice to have, in order to easily identify devices in Fleet.