feat: add resource owner scope / claim (#2274)

* feat: add resource owner scope / claime

* fix: private claimes

* fix: private claims

* fix: add claim description

* Update claims.md

Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
Fabi
2021-08-31 11:49:31 +02:00
committed by GitHub
parent c884a11f1b
commit 31a91a0039
7 changed files with 119 additions and 45 deletions

View File

@@ -2,6 +2,7 @@ package model
import (
"encoding/json"
"github.com/caos/zitadel/internal/domain"
"github.com/caos/zitadel/internal/org/repository/eventsourcing/model"
"time"
@@ -55,6 +56,19 @@ func OrgToModel(org *OrgView) *org_model.OrgView {
}
}
func OrgToDomain(org *OrgView) *domain.Org {
return &domain.Org{
ObjectRoot: es_models.ObjectRoot{
AggregateID: org.ID,
ChangeDate: org.ChangeDate,
CreationDate: org.CreationDate,
Sequence: org.Sequence,
},
Name: org.Name,
PrimaryDomain: org.Domain,
}
}
func OrgsToModel(orgs []*OrgView) []*org_model.OrgView {
modelOrgs := make([]*org_model.OrgView, len(orgs))