2020-10-16 07:49:38 +02:00
|
|
|
package eventstore
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/caos/zitadel/internal/auth/repository/eventsourcing/view"
|
|
|
|
"github.com/caos/zitadel/internal/project/model"
|
|
|
|
proj_view_model "github.com/caos/zitadel/internal/project/repository/view/model"
|
|
|
|
)
|
|
|
|
|
|
|
|
type ProjectRepo struct {
|
2021-02-22 14:08:47 +01:00
|
|
|
View *view.View
|
2020-10-16 07:49:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func (a *ApplicationRepo) ProjectRolesByProjectID(projectID string) ([]*model.ProjectRoleView, error) {
|
|
|
|
roles, err := a.View.ProjectRolesByProjectID(projectID)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return proj_view_model.ProjectRolesToModel(roles), nil
|
|
|
|
}
|