mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-25 22:08:46 +00:00
perf(command): user grant pre-condition check using the search table (#8230)
# Which Problems Are Solved Imporve the performance of user grant addition, especially for import. # How the Problems Are Solved Use the search table to query for the project grant state. This could easily be done by making the search used in `checkProjectGrantPreCondition` reusable. # Additional Changes Chanded event declerations to `const` in the `internal/repository/project` package. # Additional Context - Performance improvements for import are evaluated and acted upon internally at the moment --------- Co-authored-by: adlerhurst <[email protected]> Co-authored-by: Livio Spring <[email protected]>
This commit is contained in:
co-authored by
adlerhurst
Livio Spring
parent
d705cb11b7
commit
ecfb9d0d6d
@@ -18,8 +18,14 @@ const (
|
||||
ProjectGrantStateActive
|
||||
ProjectGrantStateInactive
|
||||
ProjectGrantStateRemoved
|
||||
|
||||
projectGrantStateMax
|
||||
)
|
||||
|
||||
func (s ProjectGrantState) Valid() bool {
|
||||
return s > ProjectGrantStateUnspecified && s < projectGrantStateMax
|
||||
}
|
||||
|
||||
func (p *ProjectGrant) IsValid() bool {
|
||||
return p.GrantedOrgID != ""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user