IAM: Implement create method for team bindings (#112003)
* implement create method for team bindings * generate openapi specs * enable dual writer for team bindings * add validation rules * generate openapi * add integration tests and fix remaining issues * fix validation test * use UIDs instead of IDs to build team binding name * use IDs when generating the TeamBinding name * fix build error * remove time truncate
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
SELECT tm.id as id, t.uid as team_uid, t.id as team_id, u.uid as user_uid, tm.created, tm.updated, tm.permission
|
||||
SELECT tm.id as id, t.uid as team_uid, t.id as team_id, u.uid as user_uid, u.id as user_id, tm.created, tm.updated, tm.permission
|
||||
FROM {{ .Ident .TeamMemberTable }} tm
|
||||
INNER JOIN {{ .Ident .TeamTable }} t ON tm.team_id = t.id
|
||||
INNER JOIN {{ .Ident .UserTable }} u ON tm.user_id = u.id
|
||||
WHERE
|
||||
tm.org_id = {{ .Arg .Query.OrgID}}
|
||||
{{ if .Query.UID }}
|
||||
AND t.uid = {{ .Arg .Query.UID }}
|
||||
{{ if .Query.TeamID }}
|
||||
AND t.id = {{ .Arg .Query.TeamID }}
|
||||
{{ end }}
|
||||
{{ if .Query.UserID }}
|
||||
AND u.id = {{ .Arg .Query.UserID }}
|
||||
{{ end }}
|
||||
{{- if .Query.Pagination.Continue }}
|
||||
AND tm.id >= {{ .Arg .Query.Pagination.Continue }}
|
||||
|
||||
Reference in New Issue
Block a user