2020-10-16 05:49:38 +00: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 13:08:47 +00:00
|
|
|
View *view.View
|
2020-10-16 05:49:38 +00: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
|
|
|
|
}
|