mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 02:54:20 +00:00
fa9f581d56
* chore: move to new org * logging * fix: org rename caos -> zitadel Co-authored-by: adlerhurst <silvan.reusser@gmail.com>
50 lines
1.0 KiB
Go
50 lines
1.0 KiB
Go
package domain
|
|
|
|
import (
|
|
"github.com/zitadel/zitadel/internal/eventstore/v1/models"
|
|
)
|
|
|
|
type Project struct {
|
|
models.ObjectRoot
|
|
|
|
State ProjectState
|
|
Name string
|
|
ProjectRoleAssertion bool
|
|
ProjectRoleCheck bool
|
|
HasProjectCheck bool
|
|
PrivateLabelingSetting PrivateLabelingSetting
|
|
}
|
|
|
|
type ProjectState int32
|
|
|
|
const (
|
|
ProjectStateUnspecified ProjectState = iota
|
|
ProjectStateActive
|
|
ProjectStateInactive
|
|
ProjectStateRemoved
|
|
|
|
projectStateMax
|
|
)
|
|
|
|
func (s ProjectState) Valid() bool {
|
|
return s > ProjectStateUnspecified && s < projectStateMax
|
|
}
|
|
|
|
type PrivateLabelingSetting int32
|
|
|
|
const (
|
|
PrivateLabelingSettingUnspecified PrivateLabelingSetting = iota
|
|
PrivateLabelingSettingEnforceProjectResourceOwnerPolicy
|
|
PrivateLabelingSettingAllowLoginUserResourceOwnerPolicy
|
|
|
|
privateLabelingSettingMax
|
|
)
|
|
|
|
func (s PrivateLabelingSetting) Valid() bool {
|
|
return s >= PrivateLabelingSettingUnspecified && s < privateLabelingSettingMax
|
|
}
|
|
|
|
func (o *Project) IsValid() bool {
|
|
return o.Name != ""
|
|
}
|