mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-16 12:58:00 +00:00
710652ef24
* feat: project role remove * feat: search queries * feat: search queries * feat: cascade remove/change project role * fix: comment in project grant * fix: remove projecr grant * fix: only search usergrants of my org * fix: delete usergrants * fix: delete usergrants * fix: check if role exists on project grant * feat: bulk add project role * fix: tests * fix: update user grants on project update * fix: return roles * feat: add resourceowner name on project grants * fix: migration number * fix: tests * fix: generate protos * fix: some unnecessary code
29 lines
1000 B
Go
29 lines
1000 B
Go
package grpc
|
|
|
|
import "github.com/caos/zitadel/internal/model"
|
|
|
|
func searchMethodToModel(method SearchMethod) model.SearchMethod {
|
|
switch method {
|
|
case SearchMethod_SEARCHMETHOD_EQUALS:
|
|
return model.SEARCHMETHOD_EQUALS
|
|
case SearchMethod_SEARCHMETHOD_CONTAINS:
|
|
return model.SEARCHMETHOD_CONTAINS
|
|
case SearchMethod_SEARCHMETHOD_STARTS_WITH:
|
|
return model.SEARCHMETHOD_STARTS_WITH
|
|
case SearchMethod_SEARCHMETHOD_EQUALS_IGNORE_CASE:
|
|
return model.SEARCHMETHOD_EQUALS_IGNORE_CASE
|
|
case SearchMethod_SEARCHMETHOD_CONTAINS_IGNORE_CASE:
|
|
return model.SEARCHMETHOD_CONTAINS_IGNORE_CASE
|
|
case SearchMethod_SEARCHMETHOD_STARTS_WITH_IGNORE_CASE:
|
|
return model.SEARCHMETHOD_STARTS_WITH_IGNORE_CASE
|
|
case SearchMethod_SEARCHMETHOD_NOT_EQUALS:
|
|
return model.SEARCHMETHOD_NOT_EQUALS
|
|
case SearchMethod_SEARCHMETHOD_IS_ONE_OF:
|
|
return model.SEARCHMETHOD_IS_ONE_OF
|
|
case SearchMethod_SEARCHMETHOD_LIST_CONTAINS:
|
|
return model.SEARCHMETHOD_LIST_CONTAINS
|
|
default:
|
|
return model.SEARCHMETHOD_EQUALS
|
|
}
|
|
}
|