mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 03:24:26 +00:00
42384763d1
* Label Policy added * save * chore: update docs action * Save * Save * Get colors from DB * Variables inserted * Get images from global directory. * Add tests * Add tests * Corrections from mergerequest * Corrections from mergerequest * Test corrected. * Added colors to all notifications. * Added colors to Corrected text and formatting.all notifications. * Spelling error corrected. * fix: tests * Merge Branch corrected. * Step6 added * Corrections from mergerequest * fix: generate management * Formatted texts. * fix: migrations Co-authored-by: Florian Forster <florian@caos.ch> Co-authored-by: adlerhurst <silvan.reusser@gmail.com> Co-authored-by: Fabiennne <fabienne.gerschwiler@gmail.com>
25 lines
656 B
Go
25 lines
656 B
Go
package model
|
|
|
|
import (
|
|
es_models "github.com/caos/zitadel/internal/eventstore/models"
|
|
iam_es_model "github.com/caos/zitadel/internal/iam/repository/eventsourcing/model"
|
|
)
|
|
|
|
func (o *Org) appendAddLabelPolicyEvent(event *es_models.Event) error {
|
|
o.LabelPolicy = new(iam_es_model.LabelPolicy)
|
|
err := o.LabelPolicy.SetDataLabel(event)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
o.LabelPolicy.ObjectRoot.CreationDate = event.CreationDate
|
|
return nil
|
|
}
|
|
|
|
func (o *Org) appendChangeLabelPolicyEvent(event *es_models.Event) error {
|
|
return o.LabelPolicy.SetDataLabel(event)
|
|
}
|
|
|
|
func (o *Org) appendRemoveLabelPolicyEvent(event *es_models.Event) {
|
|
o.LabelPolicy = nil
|
|
}
|