Skip to content

CS-472 Failed to mark video as completed#3455

Open
github-actions[bot] wants to merge 7 commits into
mainfrom
chas/mark-video-as-custom-role
Open

CS-472 Failed to mark video as completed#3455
github-actions[bot] wants to merge 7 commits into
mainfrom
chas/mark-video-as-custom-role

Conversation

@github-actions

@github-actions github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

This is an automated pull request to merge chas/mark-video-as-custom-role into dev.
It was created by the [Auto Pull Request] action.


Summary by cubic

Enabling the Employee Compliance obligation now auto-adds portal:read/update in both the app and API, fixing CS-472 where users couldn’t mark training videos as completed. This applies to new roles and updates, including roles created outside the UI.

  • Bug Fixes
    • Enforce compliance → portal on create/update (including obligations-only and permissions-only updates), validate against privilege escalation using the final permission set, and never strip explicit portal when compliance is off.
    • Sync the “Employee Compliance” toggle with portal in PermissionMatrix, and ignore unrelated permission edits.
    • Added API and app tests for no-dup portal, no portal without compliance, obligations/permissions merges, and privilege-escalation rejections.

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

Review in cubic

@vercel

vercel Bot commented Jul 20, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment Jul 21, 2026 3:14pm
comp-framework-editor Ready Ready Preview, Comment Jul 21, 2026 3:14pm
portal Ready Ready Preview, Comment Jul 21, 2026 3:14pm

Request Review

@chasprowebdev chasprowebdev changed the title [dev] [chasprowebdev] chas/mark-video-as-custom-role CS-472 Failed to mark video as completed Jul 20, 2026
@linear

linear Bot commented Jul 20, 2026

Copy link
Copy Markdown

CS-472

@chasprowebdev

Copy link
Copy Markdown
Contributor

@cubic-dev-ai please review it.

@cubic-dev-ai

cubic-dev-ai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai please review it.

@chasprowebdev I have started the AI code review. It will take a few minutes to complete.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 2 files

Confidence score: 5/5

  • Safe to merge after the addressed issues were fixed.

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

Fix all with cubic | Re-trigger cubic

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

2 issues found across 3 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/api/src/roles/roles.service.ts">

<violation number="1" location="apps/api/src/roles/roles.service.ts:448">
P2: PATCH requests with a nullable optional field now throw a server error in normalization. Reject `null` before deriving effective values (or require non-null DTO fields) so invalid payloads return `BadRequestException`.</violation>

<violation number="2" location="apps/api/src/roles/roles.service.ts:459">
P1: An obligations-only role update can grant `portal:read/update` without checking the caller holds those permissions. Validate `permissionsToPersist` after deriving it, including when only obligations changed.</violation>
</file>

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

Fix all with cubic | Re-trigger cubic

Comment thread apps/api/src/roles/roles.service.ts
Comment thread apps/api/src/roles/roles.service.ts
@chasprowebdev

Copy link
Copy Markdown
Contributor

@cubic-dev-ai please review it

@cubic-dev-ai

cubic-dev-ai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai please review it

@chasprowebdev I have started the AI code review. It will take a few minutes to complete.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 4 files

Confidence score: 5/5

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

Re-trigger cubic

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.

1 participant