mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 07:57:32 +00:00
cherry pick changes from main (#3371)
* feat: remove exif data from uploaded images (#3221) * feat: remove exif tags from images * feat: remove exif data * feat: remove exif * fix: add preferredLoginName to user grant response (#3271) * chore: log webauthn parse error (#3272) * log error * log error * feat: Help link in privacy policy * fix: convert correct detail data on organization (#3279) * fix: handle empty editor users * fix: add some missing translations (#3291) * fix: org policy translations * fix: metadata event types translation * fix: translations * fix: filter resource owner correctly on project grant members (#3281) * fix: filter resource owner correctly on project grant members * fix: filter resource owner correctly on project grant members * fix: add orgIDs to zitadel permissions request Co-authored-by: fabi <fabienne.gerschwiler@gmail.com> * fix: get IAM memberships correctly in MyZitadelPermissions (#3309) * fix: correct login names on auth and notification users (#3349) * fix: correct login names on auth and notification users * fix: migration * fix: handle resource owner in action flows (#3361) * fix merge * fix: exchange exif library (#3366) * fix: exchange exif library * ignore tiffs * requested fixes * feat: Help link in privacy policy Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com> Co-authored-by: fabi <fabienne.gerschwiler@gmail.com>
This commit is contained in:
@@ -9,5 +9,6 @@ func UpdatePrivacyPolicyToDomain(req *admin_pb.UpdatePrivacyPolicyRequest) *doma
|
||||
return &domain.PrivacyPolicy{
|
||||
TOSLink: req.TosLink,
|
||||
PrivacyLink: req.PrivacyLink,
|
||||
HelpLink: req.HelpLink,
|
||||
}
|
||||
}
|
||||
|
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func (s *Server) ListMyZitadelPermissions(ctx context.Context, _ *auth_pb.ListMyZitadelPermissionsRequest) (*auth_pb.ListMyZitadelPermissionsResponse, error) {
|
||||
perms, err := s.query.MyZitadelPermissions(ctx, authz.GetCtxData(ctx).UserID)
|
||||
perms, err := s.query.MyZitadelPermissions(ctx, authz.GetCtxData(ctx).OrgID, authz.GetCtxData(ctx).UserID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@@ -168,6 +168,7 @@ func (s *Server) ListMyProjectOrgs(ctx context.Context, req *auth_pb.ListMyProje
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
grants, err := s.query.UserGrants(ctx, &query.UserGrantsQueries{Queries: []query.SearchQuery{userGrantProjectID, userGrantUserID}})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@@ -9,6 +9,7 @@ func AddPrivacyPolicyToDomain(req *mgmt_pb.AddCustomPrivacyPolicyRequest) *domai
|
||||
return &domain.PrivacyPolicy{
|
||||
TOSLink: req.TosLink,
|
||||
PrivacyLink: req.PrivacyLink,
|
||||
HelpLink: req.HelpLink,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,5 +17,6 @@ func UpdatePrivacyPolicyToDomain(req *mgmt_pb.UpdateCustomPrivacyPolicyRequest)
|
||||
return &domain.PrivacyPolicy{
|
||||
TOSLink: req.TosLink,
|
||||
PrivacyLink: req.PrivacyLink,
|
||||
HelpLink: req.HelpLink,
|
||||
}
|
||||
}
|
||||
|
@@ -126,11 +126,6 @@ func ListProjectGrantMembersRequestToModel(ctx context.Context, req *mgmt_pb.Lis
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ownerQuery, err := query.NewMemberResourceOwnerSearchQuery(authz.GetCtxData(ctx).OrgID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
queries = append(queries, ownerQuery)
|
||||
return &query.ProjectGrantMembersQuery{
|
||||
MembersQuery: query.MembersQuery{
|
||||
SearchRequest: query.SearchRequest{
|
||||
@@ -143,6 +138,7 @@ func ListProjectGrantMembersRequestToModel(ctx context.Context, req *mgmt_pb.Lis
|
||||
},
|
||||
ProjectID: req.ProjectId,
|
||||
GrantID: req.GrantId,
|
||||
OrgID: authz.GetCtxData(ctx).OrgID,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
@@ -88,7 +88,7 @@ func OrgToPb(org *query.Org) *org_pb.Org {
|
||||
Id: org.ID,
|
||||
Name: org.Name,
|
||||
PrimaryDomain: org.Domain,
|
||||
Details: object.AddToDetailsPb(org.Sequence, org.CreationDate, org.ResourceOwner),
|
||||
Details: object.ToViewDetailsPb(org.Sequence, org.CreationDate, org.ChangeDate, org.ResourceOwner),
|
||||
State: OrgStateToPb(org.State),
|
||||
}
|
||||
}
|
||||
|
@@ -11,6 +11,7 @@ func ModelPrivacyPolicyToPb(policy *query.PrivacyPolicy) *policy_pb.PrivacyPolic
|
||||
IsDefault: policy.IsDefault,
|
||||
TosLink: policy.TOSLink,
|
||||
PrivacyLink: policy.PrivacyLink,
|
||||
HelpLink: policy.HelpLink,
|
||||
Details: object.ToViewDetailsPb(
|
||||
policy.Sequence,
|
||||
policy.CreationDate,
|
||||
|
@@ -457,7 +457,6 @@ func FooterTextToPb(text domain.FooterText) *text_pb.FooterText {
|
||||
Tos: text.TOS,
|
||||
PrivacyPolicy: text.PrivacyPolicy,
|
||||
Help: text.Help,
|
||||
HelpLink: text.HelpLink,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -947,6 +946,5 @@ func FooterTextPbToDomain(text *text_pb.FooterText) domain.FooterText {
|
||||
TOS: text.Tos,
|
||||
PrivacyPolicy: text.PrivacyPolicy,
|
||||
Help: text.Help,
|
||||
HelpLink: text.HelpLink,
|
||||
}
|
||||
}
|
||||
|
@@ -21,22 +21,23 @@ func UserGrantsToPb(assetPrefix string, grants []*query.UserGrant) []*user_pb.Us
|
||||
|
||||
func UserGrantToPb(assetPrefix string, grant *query.UserGrant) *user_pb.UserGrant {
|
||||
return &user_pb.UserGrant{
|
||||
Id: grant.ID,
|
||||
UserId: grant.UserID,
|
||||
State: user_pb.UserGrantState_USER_GRANT_STATE_ACTIVE,
|
||||
RoleKeys: grant.Roles,
|
||||
ProjectId: grant.ProjectID,
|
||||
OrgId: grant.ResourceOwner,
|
||||
ProjectGrantId: grant.GrantID,
|
||||
UserName: grant.Username,
|
||||
FirstName: grant.FirstName,
|
||||
LastName: grant.LastName,
|
||||
Email: grant.Email,
|
||||
DisplayName: grant.DisplayName,
|
||||
OrgDomain: grant.OrgPrimaryDomain,
|
||||
OrgName: grant.OrgName,
|
||||
ProjectName: grant.ProjectName,
|
||||
AvatarUrl: domain.AvatarURL(assetPrefix, grant.UserResourceOwner, grant.AvatarURL),
|
||||
Id: grant.ID,
|
||||
UserId: grant.UserID,
|
||||
State: user_pb.UserGrantState_USER_GRANT_STATE_ACTIVE,
|
||||
RoleKeys: grant.Roles,
|
||||
ProjectId: grant.ProjectID,
|
||||
OrgId: grant.ResourceOwner,
|
||||
ProjectGrantId: grant.GrantID,
|
||||
UserName: grant.Username,
|
||||
FirstName: grant.FirstName,
|
||||
LastName: grant.LastName,
|
||||
Email: grant.Email,
|
||||
DisplayName: grant.DisplayName,
|
||||
OrgDomain: grant.OrgPrimaryDomain,
|
||||
OrgName: grant.OrgName,
|
||||
ProjectName: grant.ProjectName,
|
||||
AvatarUrl: domain.AvatarURL(assetPrefix, grant.UserResourceOwner, grant.AvatarURL),
|
||||
PreferredLoginName: grant.PreferredLoginName,
|
||||
Details: object.ToViewDetailsPb(
|
||||
grant.Sequence,
|
||||
grant.CreationDate,
|
||||
|
Reference in New Issue
Block a user