praetorian-inc / chariot-ui

Chariot Offensive Security Platform
https://preview.chariot.praetorian.com
MIT License
15 stars 6 forks source link

After someone set their Organization name, we will need to display the email address somewhere in the org settings page #85

Closed peter-kwan closed 1 week ago

peter-kwan commented 2 weeks ago

Feature Description Display the email address of an org in the Org settings page.

]Problem Both the --account command line option and account = key in the keychain file require the original email address. So, if, say, "Acme Automotive North America, Inc" invited me, I need to find their root account email address to put in those options.

Right now in the UI, that email address is not displayed anywhere once the person set up an Org name. See the screenshot below, where I assumed role into Ayushi's account:

Screenshot 2024-06-18 at 4 33 55 PM

Preferred Solution Display the email address as a non-changeable piece of text in the Org Settings page after the person changed the Org name.

(This is a re-open of https://github.com/praetorian-inc/chaos-ui/issues/891)

storbeck commented 2 weeks ago

that is a bug, the disabled account row in authorized users should display the email instead of the display name.

peter-kwan commented 2 weeks ago

Need to tweak the fix. I think we should show the Org name in the top purple bar. That is the 99% use case and we want people to see an org name. Only show the email in the Org Settings for those who need to find out the email address to use in keychain files.

Screenshot 2024-06-20 at 2 00 23 PM

subbiah2806 commented 2 weeks ago

Ok so its a 2 part bug, that is been existing

We implemented collaboration in 2 places in 2 ways

BE doesn't expose the collaborators org name, BE only exposes the current users org name, so in accounts page, if there are 100 collaborators, we make 100 api calls to /my?key=%23account impersonating that collaborators and get their org name, so when we actually impersonate we use that org name to fill the banner.

We don't do that in the dropdown.

So basically going to add that functionality to dropdown as well.

If you impersonate from account page, you should see org name in banner and user email in table correctly If you impersonate from dropdown it won't show up correctly

Screenshot 2024-06-20 at 4 27 09 PM Screenshot 2024-06-20 at 4 26 53 PM

Even the name in table and dropdown varies because we don't fetch the org name to display

Screenshot 2024-06-20 at 4 33 10 PM Screenshot 2024-06-20 at 4 33 02 PM

storbeck commented 2 weeks ago

@praetorian-harry is also partially working on that as that's what we need to do to grab their profile photo anyway