mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 01:47:33 +00:00
feat(auth): My user changes (#318)
* fix: project by id loads project from view and from eventstore * fix: correct search key for role * feat(auth): my user changes * fix: improve error handling in change converters * fix: log-id
This commit is contained in:
@@ -14,7 +14,7 @@ type UserCache struct {
|
||||
|
||||
func StartCache(conf *config.CacheConfig) (*UserCache, error) {
|
||||
userCache, err := conf.Config.NewCache()
|
||||
logging.Log("EVENT-vDneN").OnError(err).Panic("unable to create user cache")
|
||||
logging.Log("EVENT-vJG2j").OnError(err).Panic("unable to create user cache")
|
||||
|
||||
return &UserCache{userCache: userCache}, nil
|
||||
}
|
||||
@@ -22,7 +22,7 @@ func StartCache(conf *config.CacheConfig) (*UserCache, error) {
|
||||
func (c *UserCache) getUser(ID string) *model.User {
|
||||
user := &model.User{ObjectRoot: models.ObjectRoot{AggregateID: ID}}
|
||||
if err := c.userCache.Get(ID, user); err != nil {
|
||||
logging.Log("EVENT-4eTZh").WithError(err).Debug("error in getting cache")
|
||||
logging.Log("EVENT-AtS0S").WithError(err).Debug("error in getting cache")
|
||||
}
|
||||
return user
|
||||
}
|
||||
@@ -30,6 +30,6 @@ func (c *UserCache) getUser(ID string) *model.User {
|
||||
func (c *UserCache) cacheUser(user *model.User) {
|
||||
err := c.userCache.Set(user.AggregateID, user)
|
||||
if err != nil {
|
||||
logging.Log("EVENT-ThnBb").WithError(err).Debug("error in setting project cache")
|
||||
logging.Log("EVENT-0V2gX").WithError(err).Debug("error in setting project cache")
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user