feat: a Fields pane for anything but a secret, first for Azure accounts: fields and groups to move through, filter and copy #7

Merged
keb merged 5 commits from feat/source-detail into main 2026-10-11 10:37:40 +02:00
2 changed files with 4 additions and 7 deletions
Showing only changes of commit 3913989cd1 - Show all commits

No files matched your search

+2 -5
View File
@@ -45,11 +45,8 @@ func (p *Provider) Account() (provider.Account, bool) {
user += " (service principal)"
}
add("user", user)
tenant := a.tenant
if a.tenantName != "" {
tenant = a.tenantName + " · " + a.tenant
}
add("tenant", tenant)
add("tenant", a.tenantName)
add("tenant ID", a.tenant)
if oid := str("oid"); oid != "" {
add("object ID", oid)
out.Copy, out.CopyLabel = oid, "object ID"
+2 -2
View File
@@ -35,7 +35,7 @@ func TestAccount(t *testing.T) {
got[f.Label] = f.Value
}
want := map[string]string{
"name": "Alice Example", "user": "alice@contoso.com", "tenant": "Contoso · t1",
"name": "Alice Example", "user": "alice@contoso.com", "tenant": "Contoso", "tenant ID": "t1",
"object ID": "11111111-2222-3333-4444-555555555555", "sign-in": "MFA · password",
"roles": "Global Administrator, role aaaaaaaa", "subs": "3 · default platform",
}
@@ -54,7 +54,7 @@ func TestAccount(t *testing.T) {
// Before any token: what az's list says.
claims = nil
a, _ = p.Account()
if len(a.Fields) != 3 || a.Copy != "" {
if len(a.Fields) != 4 || a.Copy != "" {
t.Errorf("without a token: %+v", a)
}
if _, ok := (&Provider{}).Account(); ok {