mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 01:37:31 +00:00
feat: new projects (#1207)
* fix: project events * fix: project events * fix: project events * fix: eventmapper * fix: project commands * fix: project role commands * fix: project command side * fix: oidc application * fix: oidc application * fix: reduce * fix: reduce * fix: project member * fix: project grant command side * fix: application command side * fix: project grant member remove * Update internal/v2/command/project.go Co-authored-by: Livio Amstutz <livio.a@gmail.com> * Update internal/v2/command/project.go Co-authored-by: Livio Amstutz <livio.a@gmail.com> * Update internal/v2/command/project_application.go Co-authored-by: Livio Amstutz <livio.a@gmail.com> * Update internal/v2/command/project_application.go Co-authored-by: Livio Amstutz <livio.a@gmail.com> * Update internal/v2/command/project_application.go Co-authored-by: Livio Amstutz <livio.a@gmail.com> * fix: oidc application string pw * fix: project events * fix: project grant member * feat: change application to interface Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
@@ -40,7 +40,7 @@ func ApplicationByOIDCClientID(db *gorm.DB, table, clientID string) (*model.Appl
|
||||
query := repository.PrepareGetByQuery(table, clientIDQuery)
|
||||
err := query(db, app)
|
||||
if caos_errs.IsNotFound(err) {
|
||||
return nil, caos_errs.ThrowNotFound(nil, "VIEW-DG1qh", "Errors.Project.AppNotFound")
|
||||
return nil, caos_errs.ThrowNotFound(nil, "VIEW-DG1qh", "Errors.Project.App.NotFound")
|
||||
}
|
||||
return app, err
|
||||
}
|
||||
@@ -52,7 +52,7 @@ func ApplicationByProjectIDAndAppName(db *gorm.DB, table, projectID, appName str
|
||||
query := repository.PrepareGetByQuery(table, projectIDQuery, appNameQuery)
|
||||
err := query(db, app)
|
||||
if caos_errs.IsNotFound(err) {
|
||||
return nil, caos_errs.ThrowNotFound(nil, "VIEW-Jqw1z", "Errors.Project.AppNotFound")
|
||||
return nil, caos_errs.ThrowNotFound(nil, "VIEW-Jqw1z", "Errors.Project.App.NotFound")
|
||||
}
|
||||
return app, err
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@ func ProjectGrantMemberByIDs(db *gorm.DB, table, grantID, userID string) (*model
|
||||
query := repository.PrepareGetByQuery(table, grantIDQuery, userIDQuery)
|
||||
err := query(db, grant)
|
||||
if caos_errs.IsNotFound(err) {
|
||||
return nil, caos_errs.ThrowNotFound(nil, "VIEW-Sgr32", "Errors.Project.MemberNotExisting")
|
||||
return nil, caos_errs.ThrowNotFound(nil, "VIEW-Sgr32", "Errors.Project.Member.NotExisting")
|
||||
}
|
||||
return grant, err
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@ func ProjectGrantByProjectAndOrg(db *gorm.DB, table, projectID, orgID string) (*
|
||||
query := repository.PrepareGetByQuery(table, projectIDQuery, orgIDQuery)
|
||||
err := query(db, projectGrant)
|
||||
if caos_errs.IsNotFound(err) {
|
||||
return nil, caos_errs.ThrowNotFound(nil, "VIEW-WR3z2", "Errors.Project.GrantNotExists")
|
||||
return nil, caos_errs.ThrowNotFound(nil, "VIEW-WR3z2", "Errors.Project.Grant.NotExisting")
|
||||
}
|
||||
return projectGrant, err
|
||||
}
|
||||
@@ -28,7 +28,7 @@ func ProjectGrantByID(db *gorm.DB, table, grantID string) (*model.ProjectGrantVi
|
||||
query := repository.PrepareGetByQuery(table, grantIDQuery)
|
||||
err := query(db, projectGrant)
|
||||
if caos_errs.IsNotFound(err) {
|
||||
return nil, caos_errs.ThrowNotFound(nil, "VIEW-EGdh4", "Errors.Project.GrantNotFound")
|
||||
return nil, caos_errs.ThrowNotFound(nil, "VIEW-EGdh4", "Errors.Project.Grant.NotFound")
|
||||
}
|
||||
return projectGrant, err
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@ func ProjectMemberByIDs(db *gorm.DB, table, projectID, userID string) (*model.Pr
|
||||
query := repository.PrepareGetByQuery(table, projectIDQuery, userIDQuery)
|
||||
err := query(db, role)
|
||||
if caos_errs.IsNotFound(err) {
|
||||
return nil, caos_errs.ThrowNotFound(nil, "VIEW-EgWQ2", "Errors.Project.MemberNotExisting")
|
||||
return nil, caos_errs.ThrowNotFound(nil, "VIEW-EgWQ2", "Errors.Project.Member.NotExisting")
|
||||
}
|
||||
return role, err
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@ func ProjectRoleByIDs(db *gorm.DB, table, projectID, orgID, key string) (*model.
|
||||
query := repository.PrepareGetByQuery(table, projectIDQuery, grantIDQuery, keyQuery)
|
||||
err := query(db, role)
|
||||
if caos_errs.IsNotFound(err) {
|
||||
return nil, caos_errs.ThrowNotFound(nil, "VIEW-Wtg72", "Errors.Project.RoleNotExisting")
|
||||
return nil, caos_errs.ThrowNotFound(nil, "VIEW-Wtg72", "Errors.Project.Role.NotExisting")
|
||||
}
|
||||
return role, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user