feat: tenant name and tenant ID on lines of their own
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
1543e992bb
commit
3913989cd1
2 files changed
+4
-7
No files matched your search
@@ -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"
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user