mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-23 13:07:54 +00:00
fix: all enums same style (#262)
* fix: all enums same style * fix: rename process to reduce * add some missing enum renaming Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
@@ -14,9 +14,9 @@ type UserGrant struct {
|
||||
type UserGrantState int32
|
||||
|
||||
const (
|
||||
USERGRANTSTATE_ACTIVE UserGrantState = iota
|
||||
USERGRANTSTATE_INACTIVE
|
||||
USERGRANTSTATE_REMOVED
|
||||
UserGrantStateActive UserGrantState = iota
|
||||
UserGrantStateInactive
|
||||
UserGrantStateRemoved
|
||||
)
|
||||
|
||||
func (u *UserGrant) IsValid() bool {
|
||||
@@ -24,11 +24,11 @@ func (u *UserGrant) IsValid() bool {
|
||||
}
|
||||
|
||||
func (u *UserGrant) IsActive() bool {
|
||||
return u.State == USERGRANTSTATE_ACTIVE
|
||||
return u.State == UserGrantStateActive
|
||||
}
|
||||
|
||||
func (u *UserGrant) IsInactive() bool {
|
||||
return u.State == USERGRANTSTATE_INACTIVE
|
||||
return u.State == UserGrantStateInactive
|
||||
}
|
||||
|
||||
func (u *UserGrant) RemoveRoleKeyIfExisting(key string) bool {
|
||||
|
@@ -37,14 +37,14 @@ type UserGrantSearchRequest struct {
|
||||
type UserGrantSearchKey int32
|
||||
|
||||
const (
|
||||
USERGRANTSEARCHKEY_UNSPECIFIED UserGrantSearchKey = iota
|
||||
USERGRANTSEARCHKEY_USER_ID
|
||||
USERGRANTSEARCHKEY_PROJECT_ID
|
||||
USERGRANTSEARCHKEY_RESOURCEOWNER
|
||||
USERGRANTSEARCHKEY_STATE
|
||||
USERGRANTSEARCHKEY_GRANT_ID
|
||||
USERGRANTSEARCHKEY_ORG_NAME
|
||||
USERGRANTSEARCHKEY_ROLE_KEY
|
||||
UserGrantSearchKeyUnspecified UserGrantSearchKey = iota
|
||||
UserGrantSearchKeyUserID
|
||||
UserGrantSearchKeyProjectID
|
||||
UserGrantSearchKeyResourceOwner
|
||||
UserGrantSearchKeyState
|
||||
UserGrantSearchKeyGrantID
|
||||
UserGrantSearchKeyOrgName
|
||||
UserGrantSearchKeyRoleKey
|
||||
)
|
||||
|
||||
type UserGrantSearchQuery struct {
|
||||
@@ -67,5 +67,5 @@ func (r *UserGrantSearchRequest) EnsureLimit(limit uint64) {
|
||||
}
|
||||
|
||||
func (r *UserGrantSearchRequest) AppendMyOrgQuery(orgID string) {
|
||||
r.Queries = append(r.Queries, &UserGrantSearchQuery{Key: USERGRANTSEARCHKEY_RESOURCEOWNER, Method: model.SEARCHMETHOD_EQUALS, Value: orgID})
|
||||
r.Queries = append(r.Queries, &UserGrantSearchQuery{Key: UserGrantSearchKeyResourceOwner, Method: model.SearchMethodEquals, Value: orgID})
|
||||
}
|
||||
|
Reference in New Issue
Block a user