mirror of
https://github.com/zitadel/zitadel.git
synced 2025-11-15 06:13:21 +00:00
fix(console): general fixes, project grants for owned and granted context (#425)
* update and delete project grants * fix: user grant id (#421) * fix: verboser logging on sql err (#412) * fix(eventstore): improve insert statement * fix: verbose logging on error * fix: simplify insertEvents * fix: project grant delete (#417) * fix: add grant id to user grant if needed * fix: add grant id to user grant if needed Co-authored-by: Silvan <silvan.reusser@gmail.com> * fix user grant context * lint * role validators * fix: usergrantid (#424) * fix: verboser logging on sql err (#412) * fix(eventstore): improve insert statement * fix: verbose logging on error * fix: simplify insertEvents * fix: project grant delete (#417) * fix: add grant id to user grant if needed * fix: add grant id to user grant if needed * fix: add bulk remove * fix: merge Co-authored-by: Silvan <silvan.reusser@gmail.com> Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com> Co-authored-by: Silvan <silvan.reusser@gmail.com>
This commit is contained in:
@@ -19,6 +19,7 @@ type UserGrant struct {
|
||||
State int32 `json:"-"`
|
||||
UserID string `json:"userId,omitempty"`
|
||||
ProjectID string `json:"projectId,omitempty"`
|
||||
GrantID string `json:"grantId,omitempty"`
|
||||
RoleKeys []string `json:"roleKeys,omitempty"`
|
||||
}
|
||||
|
||||
@@ -40,6 +41,7 @@ func UserGrantFromModel(grant *model.UserGrant) *UserGrant {
|
||||
ObjectRoot: grant.ObjectRoot,
|
||||
UserID: grant.UserID,
|
||||
ProjectID: grant.ProjectID,
|
||||
GrantID: grant.GrantID,
|
||||
State: int32(grant.State),
|
||||
RoleKeys: grant.RoleKeys,
|
||||
}
|
||||
@@ -50,6 +52,7 @@ func UserGrantToModel(grant *UserGrant) *model.UserGrant {
|
||||
ObjectRoot: grant.ObjectRoot,
|
||||
UserID: grant.UserID,
|
||||
ProjectID: grant.ProjectID,
|
||||
GrantID: grant.GrantID,
|
||||
State: model.UserGrantState(grant.State),
|
||||
RoleKeys: grant.RoleKeys,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user