Skip to content

CS-429 [Bug] - Attempt to upload meeting evidence showing a 401 Unauthorized error#2932

Merged
tofikwest merged 6 commits into
mainfrom
chas/upload-submission-authorization
Jun 1, 2026
Merged

CS-429 [Bug] - Attempt to upload meeting evidence showing a 401 Unauthorized error#2932
tofikwest merged 6 commits into
mainfrom
chas/upload-submission-authorization

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented May 27, 2026

This is an automated pull request to merge chas/upload-submission-authorization into dev.
It was created by the [Auto Pull Request] action.


Summary by cubic

Fixes CS-429 by allowing session, API key, or service token auth for evidence uploads and attributing each submission to an active user. Stops 401s on upload, blocks attribution to deactivated owners, and returns 400 when no active org owner exists.

  • New Features

    • uploadSubmission accepts session, API key, or service token auth.
    • Attributes to the session user; for API key/service token, falls back to the org’s oldest active owner (deactivated/inactive owners are excluded).
    • Returns 400 (BadRequest) when no active owner can be found.
  • Refactors

    • Controller uses ActingUserResolver with @Req to resolve the acting user and passes userId to the service.
    • Service uploadSubmission now takes userId instead of authContext.

Written for commit ec6a1fa. Summary will update on new commits.

Review in cubic

@vercel
Copy link
Copy Markdown

vercel Bot commented May 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
comp-framework-editor Ready Ready Preview, Comment Jun 1, 2026 7:12pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
app Skipped Skipped Jun 1, 2026 7:12pm
portal Skipped Skipped Jun 1, 2026 7:12pm

Request Review

@chasprowebdev chasprowebdev changed the title [dev] [chasprowebdev] chas/upload-submission-authorization CS-429 [Bug] - Attempt to upload meeting evidence showing a 401 Unauthorized error May 27, 2026
@linear
Copy link
Copy Markdown

linear Bot commented May 27, 2026

CS-429

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@vercel vercel Bot temporarily deployed to Preview – portal June 1, 2026 18:36 Inactive
@chasprowebdev
Copy link
Copy Markdown
Contributor

@cubic-dev-ai Ultrareview

@cubic-dev-ai
Copy link
Copy Markdown
Contributor

cubic-dev-ai Bot commented Jun 1, 2026

@cubic-dev-ai Ultrareview

@chasprowebdev Starting ultrareview - a deeper analysis than a regular review. I'll post findings when complete.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ultrareview completed in 5m 26s

2 issues found across 3 files

Confidence score: 3/5

  • There is a concrete user-impact risk in apps/api/src/evidence-forms/evidence-forms.controller.ts: attribution fallback is tied to a hardcoded owner role name rather than RBAC permissions, which can incorrectly reject valid org configurations with 400 responses.
  • A second moderate issue in the same controller allows fallback attribution to deactivated members because active-membership filtering is not enforced, which can misattribute uploads.
  • Given the medium severity and solid confidence on both findings, this looks mergeable only with caution until attribution fallback logic is aligned with RBAC and active-user checks.
  • Pay close attention to apps/api/src/evidence-forms/evidence-forms.controller.ts - fallback attribution can reject valid permissioned setups and assign uploads to inactive members.

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread apps/api/src/evidence-forms/evidence-forms.controller.ts
Comment thread apps/api/src/evidence-forms/evidence-forms.controller.ts
@vercel vercel Bot temporarily deployed to Preview – portal June 1, 2026 19:11 Inactive
@chasprowebdev
Copy link
Copy Markdown
Contributor

@cubic-dev-ai Ultrareview

@cubic-dev-ai
Copy link
Copy Markdown
Contributor

cubic-dev-ai Bot commented Jun 1, 2026

@cubic-dev-ai Ultrareview

@chasprowebdev Starting ultrareview - a deeper analysis than a regular review. I'll post findings when complete.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ultrareview completed in 5m 27s

No issues found across 5 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@tofikwest tofikwest merged commit 25f4d11 into main Jun 1, 2026
11 checks passed
@tofikwest tofikwest deleted the chas/upload-submission-authorization branch June 1, 2026 19:31
@tofikwest
Copy link
Copy Markdown
Contributor

approved

@claudfuen
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.66.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants