mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 11:34:26 +00:00
7a6ca24625
* check uniqueness on create and register user * change user email, reserve release unique email * usergrant unique aggregate * usergrant uniqueness * validate UserGrant * fix tests * domain is set on username in all orgs * domain in admin * org domain sql * zitadel domain org name * org domains * org iam policy * default org iam policy * SETUP * load login names * login by login name * login name * fix: merge master * fix: merge master * Update internal/user/repository/eventsourcing/user.go Co-authored-by: Livio Amstutz <livio.a@gmail.com> * fix: fix unique domains * fix: rename env variable Co-authored-by: adlerhurst <silvan.reusser@gmail.com> Co-authored-by: Livio Amstutz <livio.a@gmail.com>
62 lines
1.4 KiB
Go
62 lines
1.4 KiB
Go
package model
|
|
|
|
import (
|
|
"github.com/caos/zitadel/internal/model"
|
|
"time"
|
|
)
|
|
|
|
type ProjectMemberView struct {
|
|
UserID string
|
|
ProjectID string
|
|
UserName string
|
|
Email string
|
|
FirstName string
|
|
LastName string
|
|
Roles []string
|
|
CreationDate time.Time
|
|
ChangeDate time.Time
|
|
Sequence uint64
|
|
}
|
|
|
|
type ProjectMemberSearchRequest struct {
|
|
Offset uint64
|
|
Limit uint64
|
|
SortingColumn ProjectMemberSearchKey
|
|
Asc bool
|
|
Queries []*ProjectMemberSearchQuery
|
|
}
|
|
|
|
type ProjectMemberSearchKey int32
|
|
|
|
const (
|
|
PROJECTMEMBERSEARCHKEY_UNSPECIFIED ProjectMemberSearchKey = iota
|
|
PROJECTMEMBERSEARCHKEY_USER_NAME
|
|
PROJECTMEMBERSEARCHKEY_EMAIL
|
|
PROJECTMEMBERSEARCHKEY_FIRST_NAME
|
|
PROJECTMEMBERSEARCHKEY_LAST_NAME
|
|
PROJECTMEMBERSEARCHKEY_PROJECT_ID
|
|
PROJECTMEMBERSEARCHKEY_USER_ID
|
|
)
|
|
|
|
type ProjectMemberSearchQuery struct {
|
|
Key ProjectMemberSearchKey
|
|
Method model.SearchMethod
|
|
Value interface{}
|
|
}
|
|
|
|
type ProjectMemberSearchResponse struct {
|
|
Offset uint64
|
|
Limit uint64
|
|
TotalResult uint64
|
|
Result []*ProjectMemberView
|
|
}
|
|
|
|
func (r *ProjectMemberSearchRequest) EnsureLimit(limit uint64) {
|
|
if r.Limit == 0 || r.Limit > limit {
|
|
r.Limit = limit
|
|
}
|
|
}
|
|
func (r *ProjectMemberSearchRequest) AppendProjectQuery(projectID string) {
|
|
r.Queries = append(r.Queries, &ProjectMemberSearchQuery{Key: PROJECTMEMBERSEARCHKEY_PROJECT_ID, Method: model.SEARCHMETHOD_EQUALS, Value: projectID})
|
|
}
|