formatMemberNameByType returns the appropriate member name format based on user type. For regular users: users/{email} For service accounts: serviceAccounts/{email} For workload identities: workloadIdentities/{email}
(user *store.UserMessage)
| 239 | // For service accounts: serviceAccounts/{email} |
| 240 | // For workload identities: workloadIdentities/{email} |
| 241 | func formatMemberNameByType(user *store.UserMessage) string { |
| 242 | switch user.Type { |
| 243 | case storepb.PrincipalType_SERVICE_ACCOUNT: |
| 244 | return common.FormatServiceAccountEmail(user.Email) |
| 245 | case storepb.PrincipalType_WORKLOAD_IDENTITY: |
| 246 | return common.FormatWorkloadIdentityEmail(user.Email) |
| 247 | default: |
| 248 | return common.FormatUserEmail(user.Email) |
| 249 | } |
| 250 | } |
no test coverage detected