fix: Improve search user grants (#988)

* fix(management): search user grants with granted

* fix(auth): handle user grant project owner

* fix: migration
This commit is contained in:
Silvan
2020-11-19 14:13:07 +01:00
committed by GitHub
parent a40ec1f25b
commit 93e941a475
11 changed files with 48 additions and 9 deletions

View File

@@ -43,6 +43,7 @@ type UserGrantView struct {
DisplayName string `json:"-" gorm:"column:display_name"`
Email string `json:"-" gorm:"column:email"`
ProjectName string `json:"-" gorm:"column:project_name"`
ProjectOwner string `json:"-" gorm:"column:project_owner"`
OrgName string `json:"-" gorm:"column:org_name"`
OrgPrimaryDomain string `json:"-" gorm:"column:org_primary_domain"`
RoleKeys pq.StringArray `json:"roleKeys" gorm:"column:role_keys"`

View File

@@ -2,12 +2,13 @@ package model
import (
"encoding/json"
"reflect"
"testing"
es_models "github.com/caos/zitadel/internal/eventstore/models"
"github.com/caos/zitadel/internal/usergrant/model"
es_model "github.com/caos/zitadel/internal/usergrant/repository/eventsourcing/model"
"github.com/lib/pq"
"reflect"
"testing"
)
func mockUserGrantData(grant *es_model.UserGrant) []byte {