K8s/IAM: Use raw handler for display (not rest.Connector) (#99898)

This commit is contained in:
Ryan McKinley
2025-02-03 14:24:35 +03:00
committed by GitHub
parent 2aa78139c4
commit b636b81b16
7 changed files with 270 additions and 262 deletions
+4 -3
View File
@@ -33,16 +33,17 @@ type Display struct {
// AvatarURL is the url where we can get the avatar for identity
AvatarURL string `json:"avatarURL,omitempty"`
// InternalID is the legacy numreric id for identity, this is deprecated and should be phased out
// InternalID is the legacy numeric id for identity,
// Deprecated: use the identityRef where possible
InternalID int64 `json:"internalId,omitempty"`
}
type IdentityRef struct {
// Type of identity e.g. "user".
// For a full list see https://github.com/grafana/authlib/blob/2f8d13a83ca3e82da08b53726de1697ee5b5b4cc/claims/type.go#L15-L24
// For a full list see https://github.com/grafana/authlib/blob/d6737a7dc8f55e9d42834adb83b5da607ceed293/types/type.go#L15
Type claims.IdentityType `json:"type"`
// Name is the unique identifier for identity, guaranteed jo be a unique value for the type within a namespace.
// Name is the unique identifier for identity, guaranteed to be a unique value for the type within a namespace.
Name string `json:"name"`
}
@@ -72,7 +72,7 @@ func schema_pkg_apis_iam_v0alpha1_Display(ref common.ReferenceCallback) common.O
},
"internalId": {
SchemaProps: spec.SchemaProps{
Description: "InternalID is the legacy numreric id for identity, this is deprecated and should be phased out",
Description: "InternalID is the legacy numeric id for identity, Deprecated: use the identityRef where possible",
Type: []string{"integer"},
Format: "int64",
},
@@ -188,7 +188,7 @@ func schema_pkg_apis_iam_v0alpha1_IdentityRef(ref common.ReferenceCallback) comm
Properties: map[string]spec.Schema{
"type": {
SchemaProps: spec.SchemaProps{
Description: "Type of identity e.g. \"user\". For a full list see https://github.com/grafana/authlib/blob/2f8d13a83ca3e82da08b53726de1697ee5b5b4cc/claims/type.go#L15-L24",
Description: "Type of identity e.g. \"user\". For a full list see https://github.com/grafana/authlib/blob/d6737a7dc8f55e9d42834adb83b5da607ceed293/types/type.go#L15",
Default: "",
Type: []string{"string"},
Format: "",
@@ -196,7 +196,7 @@ func schema_pkg_apis_iam_v0alpha1_IdentityRef(ref common.ReferenceCallback) comm
},
"name": {
SchemaProps: spec.SchemaProps{
Description: "Name is the unique identifier for identity, guaranteed jo be a unique value for the type within a namespace.",
Description: "Name is the unique identifier for identity, guaranteed to be a unique value for the type within a namespace.",
Default: "",
Type: []string{"string"},
Format: "",
@@ -763,7 +763,7 @@ func schema_pkg_apis_iam_v0alpha1_TeamMember(ref common.ReferenceCallback) commo
},
"internalId": {
SchemaProps: spec.SchemaProps{
Description: "InternalID is the legacy numreric id for identity, this is deprecated and should be phased out",
Description: "InternalID is the legacy numeric id for identity, Deprecated: use the identityRef where possible",
Type: []string{"integer"},
Format: "int64",
},