Skip to content

Commit

Permalink
Fix the quickstart to return built-in roles (pipe-cd#3931)
Browse files Browse the repository at this point in the history
  • Loading branch information
knanao authored Sep 30, 2022
1 parent 7bdd57b commit e658a54
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/app/server/grpcapi/web_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1194,14 +1194,16 @@ func (a *WebAPI) GetProject(ctx context.Context, req *webservice.GetProjectReque

func (a *WebAPI) getProject(ctx context.Context, projectID string) (*model.Project, error) {
if p, ok := a.projectsInConfig[projectID]; ok {
return &model.Project{
p := &model.Project{
Id: p.Id,
Desc: p.Desc,
StaticAdmin: &model.ProjectStaticUser{
Username: p.StaticAdmin.Username,
PasswordHash: p.StaticAdmin.PasswordHash,
},
}, nil
}
p.SetBuiltinRBACRoles()
return p, nil
}

project, err := a.projectStore.Get(ctx, projectID)
Expand Down

0 comments on commit e658a54

Please sign in to comment.