diff --git a/console/src/styles.scss b/console/src/styles.scss
index a6392b8a6c..fd50d8fd8d 100644
--- a/console/src/styles.scss
+++ b/console/src/styles.scss
@@ -312,3 +312,7 @@ h2 {
i {
font-size: 1.5rem;
}
+
+.mat-checkbox-inner-container.mat-checkbox-inner-container-no-side-margin {
+ margin-right: .5rem !important;
+}
diff --git a/docs/docs/apis/proto/change.md b/docs/docs/apis/proto/change.md
index ccebf012df..f7d02a269d 100644
--- a/docs/docs/apis/proto/change.md
+++ b/docs/docs/apis/proto/change.md
@@ -22,6 +22,7 @@ title: zitadel/change.proto
| editor_display_name | string | - | |
| resource_owner_id | string | - | |
| editor_preferred_login_name | string | - | |
+| editor_avatar_url | string | - | |
diff --git a/internal/api/grpc/change/changes.go b/internal/api/grpc/change/changes.go
index 8e5b64a7a4..3b380c8538 100644
--- a/internal/api/grpc/change/changes.go
+++ b/internal/api/grpc/change/changes.go
@@ -31,6 +31,7 @@ func UserChangeToPb(change *user_model.UserChange) *change_pb.Change {
EditorId: change.ModifierID,
EditorDisplayName: change.ModifierName,
EditorPreferredLoginName: change.ModifierLoginName,
+ EditorAvatarUrl: change.ModifierAvatarURL,
// ResourceOwnerId: change.,TODO: resource owner not returned
}
}
@@ -51,6 +52,7 @@ func OrgChangeToPb(change *org_model.OrgChange) *change_pb.Change {
EditorId: change.ModifierId,
EditorDisplayName: change.ModifierName,
EditorPreferredLoginName: change.ModifierLoginName,
+ EditorAvatarUrl: change.ModifierAvatarURL,
// ResourceOwnerId: change.,TODO: resource owner not returned
}
}
@@ -71,6 +73,7 @@ func ProjectChangeToPb(change *proj_model.ProjectChange) *change_pb.Change {
EditorId: change.ModifierId,
EditorDisplayName: change.ModifierName,
EditorPreferredLoginName: change.ModifierLoginName,
+ EditorAvatarUrl: change.ModifierAvatarURL,
// ResourceOwnerId: change.,TODO: resource owner not returned
}
}
@@ -91,6 +94,7 @@ func AppChangeToPb(change *proj_model.ApplicationChange) *change_pb.Change {
EditorId: change.ModifierId,
EditorDisplayName: change.ModifierName,
EditorPreferredLoginName: change.ModifierLoginName,
+ EditorAvatarUrl: change.ModifierAvatarURL,
// ResourceOwnerId: change.,TODO: resource owner not returned
}
}
diff --git a/internal/auth/repository/eventsourcing/eventstore/user.go b/internal/auth/repository/eventsourcing/eventstore/user.go
index 191a7bbbfc..3e30117f35 100644
--- a/internal/auth/repository/eventsourcing/eventstore/user.go
+++ b/internal/auth/repository/eventsourcing/eventstore/user.go
@@ -4,18 +4,16 @@ import (
"context"
"time"
- "github.com/caos/zitadel/internal/eventstore/v1"
- "github.com/golang/protobuf/ptypes"
-
- "github.com/caos/zitadel/internal/config/systemdefaults"
- key_model "github.com/caos/zitadel/internal/key/model"
-
"github.com/caos/logging"
+ "github.com/golang/protobuf/ptypes"
"github.com/caos/zitadel/internal/api/authz"
"github.com/caos/zitadel/internal/auth/repository/eventsourcing/view"
+ "github.com/caos/zitadel/internal/config/systemdefaults"
"github.com/caos/zitadel/internal/errors"
+ "github.com/caos/zitadel/internal/eventstore/v1"
"github.com/caos/zitadel/internal/eventstore/v1/models"
+ key_model "github.com/caos/zitadel/internal/key/model"
key_view_model "github.com/caos/zitadel/internal/key/repository/view/model"
"github.com/caos/zitadel/internal/telemetry/tracing"
"github.com/caos/zitadel/internal/user/model"
@@ -206,6 +204,7 @@ func (repo *UserRepo) MyUserChanges(ctx context.Context, lastSequence uint64, li
change.ModifierLoginName = user.PreferredLoginName
if user.HumanView != nil {
change.ModifierName = user.HumanView.DisplayName
+ change.ModifierAvatarURL = user.HumanView.AvatarURL
}
if user.MachineView != nil {
change.ModifierName = user.MachineView.Name
diff --git a/internal/management/repository/eventsourcing/eventstore/org.go b/internal/management/repository/eventsourcing/eventstore/org.go
index acac0382e2..fa65372211 100644
--- a/internal/management/repository/eventsourcing/eventstore/org.go
+++ b/internal/management/repository/eventsourcing/eventstore/org.go
@@ -108,6 +108,7 @@ func (repo *OrgRepository) OrgChanges(ctx context.Context, id string, lastSequen
change.ModifierLoginName = user.PreferredLoginName
if user.HumanView != nil {
change.ModifierName = user.HumanView.DisplayName
+ change.ModifierAvatarURL = user.HumanView.AvatarURL
}
if user.MachineView != nil {
change.ModifierName = user.MachineView.Name
diff --git a/internal/management/repository/eventsourcing/eventstore/project.go b/internal/management/repository/eventsourcing/eventstore/project.go
index 785bf46ad1..439e8f2943 100644
--- a/internal/management/repository/eventsourcing/eventstore/project.go
+++ b/internal/management/repository/eventsourcing/eventstore/project.go
@@ -203,6 +203,7 @@ func (repo *ProjectRepo) ProjectChanges(ctx context.Context, id string, lastSequ
change.ModifierLoginName = user.PreferredLoginName
if user.HumanView != nil {
change.ModifierName = user.HumanView.DisplayName
+ change.ModifierAvatarURL = user.HumanView.AvatarURL
}
if user.MachineView != nil {
change.ModifierName = user.MachineView.Name
@@ -282,6 +283,7 @@ func (repo *ProjectRepo) ApplicationChanges(ctx context.Context, projectID strin
change.ModifierLoginName = user.PreferredLoginName
if user.HumanView != nil {
change.ModifierName = user.HumanView.DisplayName
+ change.ModifierAvatarURL = user.HumanView.AvatarURL
}
if user.MachineView != nil {
change.ModifierName = user.MachineView.Name
diff --git a/internal/management/repository/eventsourcing/eventstore/user.go b/internal/management/repository/eventsourcing/eventstore/user.go
index dcfe9adaff..3126b9c82c 100644
--- a/internal/management/repository/eventsourcing/eventstore/user.go
+++ b/internal/management/repository/eventsourcing/eventstore/user.go
@@ -105,6 +105,7 @@ func (repo *UserRepo) UserChanges(ctx context.Context, id string, lastSequence u
change.ModifierLoginName = user.PreferredLoginName
if user.HumanView != nil {
change.ModifierName = user.HumanView.DisplayName
+ change.ModifierAvatarURL = user.HumanView.AvatarURL
}
if user.MachineView != nil {
change.ModifierName = user.MachineView.Name
diff --git a/internal/org/model/org.go b/internal/org/model/org.go
index 3b7b2db054..f304d3fdba 100644
--- a/internal/org/model/org.go
+++ b/internal/org/model/org.go
@@ -40,6 +40,7 @@ type OrgChange struct {
ModifierId string `json:"modifierUser,omitempty"`
ModifierName string `json:"-"`
ModifierLoginName string `json:"-"`
+ ModifierAvatarURL string `json:"-"`
Data interface{} `json:"data,omitempty"`
}
diff --git a/internal/project/model/application.go b/internal/project/model/application.go
index 2dbc220c8a..1eead637e3 100644
--- a/internal/project/model/application.go
+++ b/internal/project/model/application.go
@@ -28,6 +28,7 @@ type ApplicationChange struct {
ModifierId string `json:"modifierUser,omitempty"`
ModifierName string `json:"-"`
ModifierLoginName string `json:"-"`
+ ModifierAvatarURL string `json:"-"`
Data interface{} `json:"data,omitempty"`
}
diff --git a/internal/project/model/project.go b/internal/project/model/project.go
index e8e3eed851..8dd899300f 100644
--- a/internal/project/model/project.go
+++ b/internal/project/model/project.go
@@ -30,6 +30,7 @@ type ProjectChange struct {
ModifierId string `json:"modifierUser,omitempty"`
ModifierName string `json:"-"`
ModifierLoginName string `json:"-"`
+ ModifierAvatarURL string `json:"-"`
Data interface{} `json:"data,omitempty"`
}
diff --git a/internal/ui/console/console.go b/internal/ui/console/console.go
index ee3c6f61c0..43756c6c31 100644
--- a/internal/ui/console/console.go
+++ b/internal/ui/console/console.go
@@ -86,7 +86,7 @@ func csp(zitadelDomain string) *middleware.CSP {
AddHost("fonts.googleapis.com").
AddHost("fonts.gstatic.com").
AddHost("maxst.icons8.com") //TODO: host it
- csp.ImgSrc = csp.ImgSrc.AddScheme("blob")
+ csp.ImgSrc = csp.ImgSrc.AddHost(zitadelDomain).AddScheme("blob")
return &csp
}
diff --git a/internal/user/model/user_changes.go b/internal/user/model/user_changes.go
index 98da031b3c..6c13653ba2 100644
--- a/internal/user/model/user_changes.go
+++ b/internal/user/model/user_changes.go
@@ -16,5 +16,6 @@ type UserChange struct {
ModifierID string `json:"modifierUser,omitempty"`
ModifierName string `json:"-"`
ModifierLoginName string `json:"-"`
+ ModifierAvatarURL string `json:"-"`
Data interface{} `json:"data,omitempty"`
}
diff --git a/operator/zitadel/kinds/iam/zitadel/configuration/adapt.go b/operator/zitadel/kinds/iam/zitadel/configuration/adapt.go
index 1cd773c14e..c995e66593 100644
--- a/operator/zitadel/kinds/iam/zitadel/configuration/adapt.go
+++ b/operator/zitadel/kinds/iam/zitadel/configuration/adapt.go
@@ -1,24 +1,26 @@
package configuration
import (
+ "time"
+
"github.com/caos/orbos/mntr"
"github.com/caos/orbos/pkg/kubernetes"
"github.com/caos/orbos/pkg/kubernetes/resources/configmap"
"github.com/caos/orbos/pkg/kubernetes/resources/secret"
"github.com/caos/orbos/pkg/labels"
+
"github.com/caos/zitadel/operator"
"github.com/caos/zitadel/operator/zitadel/kinds/iam/zitadel/configuration/users"
"github.com/caos/zitadel/operator/zitadel/kinds/iam/zitadel/database"
- "time"
)
type ConsoleEnv struct {
- AuthServiceURL string `json:"authServiceUrl"`
- MgmtServiceURL string `json:"mgmtServiceUrl"`
- Issuer string `json:"issuer"`
- ClientID string `json:"clientid"`
- SubServiceURL string `json:"subscriptionServiceUrl"`
- UploadServiceURL string `json:"uploadServiceUrl"`
+ AuthServiceURL string `json:"authServiceUrl"`
+ MgmtServiceURL string `json:"mgmtServiceUrl"`
+ Issuer string `json:"issuer"`
+ ClientID string `json:"clientid"`
+ SubServiceURL string `json:"subscriptionServiceUrl"`
+ AssetServiceURL string `json:"assetServiceUrl"`
}
const (
diff --git a/operator/zitadel/kinds/iam/zitadel/configuration/literals.go b/operator/zitadel/kinds/iam/zitadel/configuration/literals.go
index ba45f39d7b..e8d9b655bd 100644
--- a/operator/zitadel/kinds/iam/zitadel/configuration/literals.go
+++ b/operator/zitadel/kinds/iam/zitadel/configuration/literals.go
@@ -228,7 +228,7 @@ func literalsConsoleCM(
consoleEnv.AuthServiceURL = "https://" + dns.Subdomains.API + "." + dns.Domain
consoleEnv.MgmtServiceURL = "https://" + dns.Subdomains.API + "." + dns.Domain
consoleEnv.SubServiceURL = "https://" + dns.Subdomains.Subscription + "." + dns.Domain
- consoleEnv.UploadServiceURL = "https://" + dns.Subdomains.API + "." + dns.Domain
+ consoleEnv.AssetServiceURL = "https://" + dns.Subdomains.API + "." + dns.Domain
data, err := json.Marshal(consoleEnv)
if err != nil {
diff --git a/operator/zitadel/kinds/iam/zitadel/configuration/literals_test.go b/operator/zitadel/kinds/iam/zitadel/configuration/literals_test.go
index 51d3cec9cf..3eb6c7e4b1 100644
--- a/operator/zitadel/kinds/iam/zitadel/configuration/literals_test.go
+++ b/operator/zitadel/kinds/iam/zitadel/configuration/literals_test.go
@@ -553,7 +553,7 @@ func TestConfiguration_LiteralsConsoleCM(t *testing.T) {
Data: map[string]string{"environment.json": "{\"authServiceUrl\":\"https://.\",\"mgmtServiceUrl\":\"https://.\",\"issuer\":\"https://.\",\"clientid\":\"\",\"subscriptionServiceUrl\":\"https://.\"}"},
}
- equals := map[string]string{"environment.json": "{\"authServiceUrl\":\"https://.\",\"mgmtServiceUrl\":\"https://.\",\"issuer\":\"https://.\",\"clientid\":\"\",\"subscriptionServiceUrl\":\"https://.\",\"uploadServiceUrl\":\"https://.\"}"}
+ equals := map[string]string{"environment.json": "{\"authServiceUrl\":\"https://.\",\"mgmtServiceUrl\":\"https://.\",\"issuer\":\"https://.\",\"clientid\":\"\",\"subscriptionServiceUrl\":\"https://.\",\"assetServiceUrl\":\"https://.\"}"}
k8sClient.EXPECT().GetConfigMap(namespace, cmName).Times(1).Return(cm, nil)
literals := literalsConsoleCM(clientID, desiredEmpty.DNS, k8sClient, namespace, cmName)
@@ -575,7 +575,7 @@ func TestConfiguration_LiteralsConsoleCMFull(t *testing.T) {
}
equals := map[string]string{
- "environment.json": "{\"authServiceUrl\":\"https://api.domain\",\"mgmtServiceUrl\":\"https://api.domain\",\"issuer\":\"https://issuer.domain\",\"clientid\":\"test\",\"subscriptionServiceUrl\":\"https://sub.domain\",\"uploadServiceUrl\":\"https://api.domain\"}",
+ "environment.json": "{\"authServiceUrl\":\"https://api.domain\",\"mgmtServiceUrl\":\"https://api.domain\",\"issuer\":\"https://issuer.domain\",\"clientid\":\"test\",\"subscriptionServiceUrl\":\"https://sub.domain\",\"assetServiceUrl\":\"https://api.domain\"}",
}
k8sClient.EXPECT().GetConfigMap(namespace, cmName).Times(1).Return(cm, nil)
@@ -595,12 +595,12 @@ func TestConfiguration_LiteralsConsoleCMWithCM(t *testing.T) {
Name: cmName,
},
Data: map[string]string{
- "environment.json": "{\"authServiceUrl\":\"https://api.domain\",\"mgmtServiceUrl\":\"https://api.domain\",\"issuer\":\"https://issuer.domain\",\"clientid\":\"\",\"subscriptionServiceUrl\":\"https://sub.domain\",\"uploadServiceUrl\":\"https://api.domain\"}",
+ "environment.json": "{\"authServiceUrl\":\"https://api.domain\",\"mgmtServiceUrl\":\"https://api.domain\",\"issuer\":\"https://issuer.domain\",\"clientid\":\"\",\"subscriptionServiceUrl\":\"https://sub.domain\",\"assetServiceUrl\":\"https://api.domain\"}",
},
}
equals := map[string]string{
- "environment.json": "{\"authServiceUrl\":\"https://api.domain\",\"mgmtServiceUrl\":\"https://api.domain\",\"issuer\":\"https://issuer.domain\",\"clientid\":\"test\",\"subscriptionServiceUrl\":\"https://sub.domain\",\"uploadServiceUrl\":\"https://api.domain\"}",
+ "environment.json": "{\"authServiceUrl\":\"https://api.domain\",\"mgmtServiceUrl\":\"https://api.domain\",\"issuer\":\"https://issuer.domain\",\"clientid\":\"test\",\"subscriptionServiceUrl\":\"https://sub.domain\",\"assetServiceUrl\":\"https://api.domain\"}",
}
k8sClient.EXPECT().GetConfigMap(namespace, cmName).Times(1).Return(cm, nil)
@@ -620,12 +620,12 @@ func TestConfiguration_LiteralsConsoleCMWithCMFull(t *testing.T) {
Name: cmName,
},
Data: map[string]string{
- "environment.json": "{\"authServiceUrl\":\"https://api.domain\",\"mgmtServiceUrl\":\"https://api.domain\",\"issuer\":\"https://issuer.domain\",\"clientid\":\"test\",\"subscriptionServiceUrl\":\"https://sub.domain\",\"uploadServiceUrl\":\"https://api.domain\"}",
+ "environment.json": "{\"authServiceUrl\":\"https://api.domain\",\"mgmtServiceUrl\":\"https://api.domain\",\"issuer\":\"https://issuer.domain\",\"clientid\":\"test\",\"subscriptionServiceUrl\":\"https://sub.domain\",\"assetServiceUrl\":\"https://api.domain\"}",
},
}
equals := map[string]string{
- "environment.json": "{\"authServiceUrl\":\"https://api.domain\",\"mgmtServiceUrl\":\"https://api.domain\",\"issuer\":\"https://issuer.domain\",\"clientid\":\"test\",\"subscriptionServiceUrl\":\"https://sub.domain\",\"uploadServiceUrl\":\"https://api.domain\"}",
+ "environment.json": "{\"authServiceUrl\":\"https://api.domain\",\"mgmtServiceUrl\":\"https://api.domain\",\"issuer\":\"https://issuer.domain\",\"clientid\":\"test\",\"subscriptionServiceUrl\":\"https://sub.domain\",\"assetServiceUrl\":\"https://api.domain\"}",
}
k8sClient.EXPECT().GetConfigMap(namespace, cmName).Times(1).Return(cm, nil)
diff --git a/proto/zitadel/change.proto b/proto/zitadel/change.proto
index 67733924d3..dd79501ed9 100644
--- a/proto/zitadel/change.proto
+++ b/proto/zitadel/change.proto
@@ -45,6 +45,12 @@ message Change {
example: "\"gigi@acme.zitadel.ch\"";
}
];
+ string editor_avatar_url = 8 [
+ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
+ description: "avatar url of the editor";
+ example: "\"https://api.zitadel.ch/assets/v1/avatar-32432jkh4kj32\"";
+ }
+ ];
}
message ChangeQuery {