mirror of
https://github.com/zitadel/zitadel.git
synced 2025-03-01 00:07:22 +00:00
fix: backend (#1481)
* fix: check ids in proto * fix sign out * improve displayed login name after user selection * fix init user in login * fix init password in login Co-authored-by: fabi <fabienne.gerschwiler@gmail.com>
This commit is contained in:
parent
31b542015e
commit
c0b37924c8
@ -244,7 +244,11 @@ func (repo *AuthRequestRepo) SelectUser(ctx context.Context, id, userID, userAge
|
||||
if request.RequestedOrgID != "" && request.RequestedOrgID != user.ResourceOwner {
|
||||
return errors.ThrowPreconditionFailed(nil, "EVENT-fJe2a", "Errors.User.NotAllowedOrg")
|
||||
}
|
||||
request.SetUserInfo(user.ID, user.UserName, user.PreferredLoginName, user.DisplayName, user.ResourceOwner)
|
||||
username := user.UserName
|
||||
if request.RequestedOrgID == "" {
|
||||
username = user.PreferredLoginName
|
||||
}
|
||||
request.SetUserInfo(user.ID, username, user.PreferredLoginName, user.DisplayName, user.ResourceOwner)
|
||||
return repo.AuthRequests.UpdateAuthRequest(ctx, request)
|
||||
}
|
||||
|
||||
|
@ -372,7 +372,7 @@ type HumanSignedOutEvent struct {
|
||||
}
|
||||
|
||||
func (e *HumanSignedOutEvent) Data() interface{} {
|
||||
return nil
|
||||
return e
|
||||
}
|
||||
|
||||
func (e *HumanSignedOutEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint {
|
||||
|
@ -36,15 +36,17 @@
|
||||
|
||||
{{ template "error-message" .}}
|
||||
|
||||
<button type="submit" name="resend" value="true" class="lgn-button lgn-primary block" formnovalidate>{{t "Actions.Resend" }}</button>
|
||||
|
||||
<div class="lgn-actions lgn-reverse-order">
|
||||
<!-- position element in header -->
|
||||
<a class="lgn-icon-button lgn-left-action" href="{{ loginUrl }}">
|
||||
<i class="lgn-icon-arrow-left-solid"></i>
|
||||
</a>
|
||||
<button type="submit" id="init-button" name="resend" value="false"
|
||||
class="lgn-raised-button lgn-primary">{{t "Actions.Next"}}</button>
|
||||
|
||||
<span class="fill-space"></span>
|
||||
<a class="lgn-stroked-button lgn-primary" href="{{ loginUrl }}">
|
||||
{{t "Actions.Cancel"}}
|
||||
</a>
|
||||
|
||||
<button type="submit" name="resend" value="true" class="lgn-stroked-button" formnovalidate>{{t "Actions.Resend" }}</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
@ -21,9 +21,6 @@
|
||||
required>
|
||||
</div>
|
||||
|
||||
<button class="lgn-button lgn-primary block" type="submit" name="resend" value="true"
|
||||
formnovalidate>{{t "Actions.Resend" }}</button>
|
||||
|
||||
{{ if not .PasswordSet }}
|
||||
<div class="field">
|
||||
<label class="lgn-label" for="password">{{t "InitUser.NewPassword"}}</label>
|
||||
@ -43,13 +40,18 @@
|
||||
|
||||
{{ template "error-message" .}}
|
||||
|
||||
<div class="lgn-actions">
|
||||
<a class="lgn-stroked-button lgn-primary" href="{{ loginUrl }}">
|
||||
{{t "Actions.Cancel"}}
|
||||
<div class="lgn-actions lgn-reverse-order">
|
||||
<!-- position element in header -->
|
||||
<a class="lgn-icon-button lgn-left-action" href="{{ loginUrl }}">
|
||||
<i class="lgn-icon-arrow-left-solid"></i>
|
||||
</a>
|
||||
<span class="fill-space"></span>
|
||||
|
||||
<button type="submit" id="init-button" name="resend" value="false"
|
||||
class="lgn-primary lgn-raised-button">{{t "Actions.Next"}}</button>
|
||||
|
||||
<span class="fill-space"></span>
|
||||
|
||||
<button type="submit" name="resend" value="true" class="lgn-stroked-button" formnovalidate>{{t "Actions.Resend" }}</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
@ -827,7 +827,7 @@ service ManagementService {
|
||||
|
||||
option (zitadel.v1.auth_option) = {
|
||||
permission: "project.role.write"
|
||||
check_field_name: "Id"
|
||||
check_field_name: "ProjectId"
|
||||
};
|
||||
}
|
||||
|
||||
@ -840,7 +840,7 @@ service ManagementService {
|
||||
|
||||
option (zitadel.v1.auth_option) = {
|
||||
permission: "project.role.write"
|
||||
check_field_name: "Id"
|
||||
check_field_name: "ProjectId"
|
||||
};
|
||||
}
|
||||
|
||||
@ -852,7 +852,7 @@ service ManagementService {
|
||||
|
||||
option (zitadel.v1.auth_option) = {
|
||||
permission: "project.role.write"
|
||||
check_field_name: "Id"
|
||||
check_field_name: "ProjectId"
|
||||
};
|
||||
}
|
||||
|
||||
@ -864,7 +864,7 @@ service ManagementService {
|
||||
|
||||
option (zitadel.v1.auth_option) = {
|
||||
permission: "project.role.delete"
|
||||
check_field_name: "Id"
|
||||
check_field_name: "ProjectId"
|
||||
};
|
||||
}
|
||||
|
||||
@ -910,7 +910,7 @@ service ManagementService {
|
||||
|
||||
option (zitadel.v1.auth_option) = {
|
||||
permission: "project.member.write"
|
||||
check_field_name: "Id"
|
||||
check_field_name: "ProjectId"
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user