CS-472 Failed to mark video as completed#3455
Open
github-actions[bot] wants to merge 7 commits into
Open
Conversation
Contributor
|
@cubic-dev-ai please review it. |
Contributor
@chasprowebdev I have started the AI code review. It will take a few minutes to complete. |
Contributor
There was a problem hiding this comment.
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
Contributor
There was a problem hiding this comment.
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
Contributor
|
@cubic-dev-ai please review it |
Contributor
@chasprowebdev I have started the AI code review. It will take a few minutes to complete. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/updatein 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.portalon create/update (including obligations-only and permissions-only updates), validate against privilege escalation using the final permission set, and never strip explicitportalwhen compliance is off.portalinPermissionMatrix, and ignore unrelated permission edits.portal, noportalwithout compliance, obligations/permissions merges, and privilege-escalation rejections.Written for commit a27295e. Summary will update on new commits.