mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-28 18:12:16 +00:00
fix: add project id on project grant (#202)
* fix: add project id on project grant * fix: get granted project grant member
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -167,7 +167,7 @@
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1ProjectGrant"
|
||||
"$ref": "#/definitions/v1GrantedProject"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -65,12 +65,12 @@ func (s *Server) ProjectByID(ctx context.Context, id *ProjectID) (*Project, erro
|
||||
return projectFromModel(project), nil
|
||||
}
|
||||
|
||||
func (s *Server) GetGrantedProjectGrantByID(ctx context.Context, in *ProjectGrantID) (*ProjectGrant, error) {
|
||||
project, err := s.project.ProjectGrantByID(ctx, in.ProjectId, in.Id)
|
||||
func (s *Server) GetGrantedProjectGrantByID(ctx context.Context, in *ProjectGrantID) (*GrantedProject, error) {
|
||||
project, err := s.project.GetGrantedProjectGrantByIDs(ctx, in.ProjectId, in.Id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return projectGrantFromModel(project), nil
|
||||
return grantedProjectFromModel(project), nil
|
||||
}
|
||||
|
||||
func (s *Server) AddProjectRole(ctx context.Context, in *ProjectRoleAdd) (*ProjectRole, error) {
|
||||
|
||||
@@ -23,6 +23,7 @@ func projectGrantFromModel(grant *proj_model.ProjectGrant) *ProjectGrant {
|
||||
GrantedOrgId: grant.GrantedOrgID,
|
||||
RoleKeys: grant.RoleKeys,
|
||||
Sequence: grant.Sequence,
|
||||
ProjectId: grant.AggregateID,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user