mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 11:34:26 +00:00
62b654ea18
* feat: iam members in admin api * feat: add error id in translate error * fix: resolve merge conflicts
19 lines
419 B
Go
19 lines
419 B
Go
package model
|
|
|
|
import es_models "github.com/caos/zitadel/internal/eventstore/models"
|
|
|
|
type IamMember struct {
|
|
es_models.ObjectRoot
|
|
|
|
UserID string
|
|
Roles []string
|
|
}
|
|
|
|
func NewIamMember(iamID, userID string) *IamMember {
|
|
return &IamMember{ObjectRoot: es_models.ObjectRoot{AggregateID: iamID}, UserID: userID}
|
|
}
|
|
|
|
func (i *IamMember) IsValid() bool {
|
|
return i.AggregateID != "" && i.UserID != "" && len(i.Roles) != 0
|
|
}
|