fix: some backend bugs (#1438)

* fix: fix setup

* fix oidc app change

* fix: fix migration and proto

* fix: fix granted projects

* setup1 apis instead of apps

* fix: add object detail with creation date

* fix user phone change

* add localizer to AddOIDCAppResponse

* fix test

* fix domain test

* fix: converter

Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
Fabi
2021-03-19 18:46:26 +01:00
committed by GitHub
parent 24527bd354
commit 6b1f7ba333
58 changed files with 578 additions and 429 deletions

View File

@@ -232,6 +232,17 @@ func IDPProviderTypeFromPb(typ idp_pb.IDPOwnerType) domain.IdentityProviderType
}
}
func IDPProviderTypeModelFromPb(typ idp_pb.IDPOwnerType) iam_model.IDPProviderType {
switch typ {
case idp_pb.IDPOwnerType_IDP_OWNER_TYPE_ORG:
return iam_model.IDPProviderTypeOrg
case idp_pb.IDPOwnerType_IDP_OWNER_TYPE_SYSTEM:
return iam_model.IDPProviderTypeSystem
default:
return iam_model.IDPProviderTypeOrg
}
}
func IDPIDQueryToModel(query *idp_pb.IDPIDQuery) *iam_model.IDPConfigSearchQuery {
return &iam_model.IDPConfigSearchQuery{
Key: iam_model.IDPConfigSearchKeyIdpConfigID, //TODO: whats the difference between idpconfigid and aggregateid search key?
@@ -247,3 +258,11 @@ func IDPNameQueryToModel(query *idp_pb.IDPNameQuery) *iam_model.IDPConfigSearchQ
Value: query.Name,
}
}
func IDPOwnerTypeQueryToModel(query *idp_pb.IDPOwnerTypeQuery) *iam_model.IDPConfigSearchQuery {
return &iam_model.IDPConfigSearchQuery{
Key: iam_model.IDPConfigSearchKeyName,
Method: domain.SearchMethodEquals,
Value: IDPProviderTypeModelFromPb(query.OwnerType),
}
}