mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 03:27:32 +00:00
fix: failed events (#211)
* fix: add iam roles to permissions * fix: show state initial on usersearch * fix: search project roles returns only roles of project * fix: add project member owner on project create * fix: create new object oon failed event * feat: parse error body on chat message * feat: remove comment * fix: set policy eventstore in admin * fix failed events * fix resend for password set * fix: create user with correct resource owner Co-authored-by: Fabiennne <fabienne.gerschwiler@gmail.com>
This commit is contained in:
@@ -68,7 +68,11 @@ func (l *Login) checkPWCode(w http.ResponseWriter, r *http.Request, authReq *mod
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (l *Login) resendPasswordSet(w http.ResponseWriter, r *http.Request, authReq *model.AuthRequest) {
|
func (l *Login) resendPasswordSet(w http.ResponseWriter, r *http.Request, authReq *model.AuthRequest) {
|
||||||
err := l.authRepo.RequestPasswordReset(r.Context(), authReq.UserName)
|
userOrg := login
|
||||||
|
if authReq != nil {
|
||||||
|
userOrg = authReq.UserOrgID
|
||||||
|
}
|
||||||
|
err := l.authRepo.RequestPasswordReset(setContext(r.Context(), userOrg), authReq.UserName)
|
||||||
l.renderInitPassword(w, r, authReq, authReq.UserID, "", err)
|
l.renderInitPassword(w, r, authReq, authReq.UserID, "", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -60,7 +60,7 @@ func UserCreateAggregate(ctx context.Context, aggCreator *es_models.AggregateCre
|
|||||||
|
|
||||||
var agg *es_models.Aggregate
|
var agg *es_models.Aggregate
|
||||||
if resourceOwner != "" {
|
if resourceOwner != "" {
|
||||||
agg, err = UserAggregateOverwriteContext(ctx, aggCreator, user, user.AggregateID, resourceOwner)
|
agg, err = UserAggregateOverwriteContext(ctx, aggCreator, user, resourceOwner, user.AggregateID)
|
||||||
} else {
|
} else {
|
||||||
agg, err = UserAggregate(ctx, aggCreator, user)
|
agg, err = UserAggregate(ctx, aggCreator, user)
|
||||||
}
|
}
|
||||||
|
@@ -13,9 +13,9 @@ const (
|
|||||||
|
|
||||||
type FailedEvent struct {
|
type FailedEvent struct {
|
||||||
ViewName string `gorm:"column:view_name;primary_key"`
|
ViewName string `gorm:"column:view_name;primary_key"`
|
||||||
FailedSequence uint64 `gorm:"column:failed_sequence;primary_key`
|
FailedSequence uint64 `gorm:"column:failed_sequence;primary_key"`
|
||||||
FailureCount uint64 `gorm:"column:failure_count`
|
FailureCount uint64 `gorm:"column:failure_count"`
|
||||||
ErrMsg string `gorm:"column:err_msg`
|
ErrMsg string `gorm:"column:err_msg"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type FailedEventSearchQuery struct {
|
type FailedEventSearchQuery struct {
|
||||||
|
@@ -11,7 +11,7 @@ type actualSequece struct {
|
|||||||
|
|
||||||
type currentSequence struct {
|
type currentSequence struct {
|
||||||
ViewName string `gorm:"column:view_name;primary_key"`
|
ViewName string `gorm:"column:view_name;primary_key"`
|
||||||
CurrentSequence uint64 `gorm:"column:current_sequence`
|
CurrentSequence uint64 `gorm:"column:current_sequence"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type SequenceSearchKey int32
|
type SequenceSearchKey int32
|
||||||
|
Reference in New Issue
Block a user