You've already forked agentic-coding-workflow
feat(app): wire workspace module + integration test for ws closed loop
This commit is contained in:
@@ -93,6 +93,19 @@ func (s *projectService) Get(ctx context.Context, c Caller, slug string) (*Proje
|
||||
return p, nil
|
||||
}
|
||||
|
||||
// GetByID 与 Get 等价但按 uuid 寻址,用于 workspace.ProjectAccess.ResolveByID。
|
||||
// 鉴权矩阵与 Get 相同:private 仅 owner+admin,internal 任意登录用户。
|
||||
func (s *projectService) GetByID(ctx context.Context, c Caller, id uuid.UUID) (*Project, error) {
|
||||
p, err := s.repo.GetProjectByID(ctx, id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := assertReadable(p, c); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return p, nil
|
||||
}
|
||||
|
||||
func (s *projectService) List(ctx context.Context, c Caller, includeArchived bool) ([]*Project, error) {
|
||||
all, err := s.repo.ListProjects(ctx, includeArchived)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user