Skip to content

test: Role name reuse after deletion with a restricted _Role class-level permission - #10846

Merged
mtrezza merged 1 commit into
parse-community:alphafrom
mtrezza:tests/role-name-reuse-restricted-clp
Oct 29, 2026
Merged

mtrezza merged 1 commit into
parse-community:alphafrom
mtrezza:tests/role-name-reuse-restricted-clp

Conversation

@mtrezza

@mtrezza mtrezza commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Pull Request

Issue

Role name reuse after deletion with a restricted _Role class-level permission

Tasks

  • Add tests

Summary by CodeRabbit

  • Tests
    • Added coverage for reusing deleted role names that are still referenced by access controls, including checks that non-master attempts are rejected without changing protected data.
    • Added coverage confirming master-key creation can reuse a deleted role name.

@parse-github-assistant

Copy link
Copy Markdown

🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review.

Tip

  • Keep pull requests small. Large PRs will be rejected. Break complex features into smaller, incremental PRs.
  • Use Test Driven Development. Write failing tests before implementing functionality. Ensure tests pass.
  • Group code into logical blocks. Add a short comment before each block to explain its purpose.
  • We offer conceptual guidance. Coding is up to you. PRs must be merge-ready for human review.
  • Our review focuses on concept, not quality. PRs with code issues will be rejected. Use an AI agent.
  • Human review time is precious. Avoid review ping-pong. Inspect and test your AI-generated code.

Note

Please respond to review comments from AI agents just like you would to comments from a human reviewer. Let the reviewer resolve their own comments, unless they have reviewed and accepted your commit, or agreed with your explanation for why the feedback was incorrect.

Caution

Pull requests must be written using an AI agent with human supervision. Pull requests written entirely by a human will likely be rejected, because of lower code quality, higher review effort and the higher risk of introducing bugs. Please note that AI review comments on this pull request alone do not satisfy this requirement. Our CI and AI review are safeguards, not development tools. If many issues are flagged, rethink your development approach. Invest more effort in planning and design rather than using review cycles to fix low-quality code.

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 0ef6c085-4db3-4837-aa22-600ea10ac2c3
Commits

Reviewing files that changed from the base of the PR and between dc7fa29 and 3de63b5.

Files selected for processing: 1
  • spec/ParseRole.spec.js

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Walkthrough

Added tests for role creation and rename attempts that reuse deleted role names still referenced by object ACLs, class-level permissions, or _User CLPs. The tests also cover master-key creation with a deleted role name.

Changes: Deleted Role Name Reuse

Layer / File(s) Summary
Role-name reuse test setup and scenarios
spec/ParseRole.spec.js
Adds REST helpers and tests that non-master creation or rename attempts fail with OPERATION_FORBIDDEN when deleted role names remain referenced. Checks protected objects and permissions, and verifies master-key creation succeeds.

Priority: Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: Minimal · up to 3de63

No merge-blocking issue was identified in the added tests.

Pre-merge checks: Passed 7
Check name Status Explanation
Title check Passed The title begins with the allowed test: prefix and clearly describes the role-name reuse tests.
Description check Passed The description includes the required Pull Request, Issue, and Tasks sections and identifies the added tests. The Approach section is missing, and non-applicable task items were not removed or marked.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Security Check Passed PASS. The pull request changes only spec/ParseRole.spec.js; it adds security regression tests and does not modify production code. The added requests use test-only credentials and assert access deni…
Engage In Review Feedback Passed No review feedback comments were returned, and the current review produced zero actionable findings. Therefore, there was no feedback requiring engagement, implementation, or discussion.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.

Full details: Security Check

Explanation

PASS. The pull request changes only spec/ParseRole.spec.js; it adds security regression tests and does not modify production code. The added requests use test-only credentials and assert access denial for deleted-role name reuse. No dangerous execution, dynamic evaluation, external URL, or other vulnerable production pattern was introduced.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.17%. Comparing base (d88efed) to head (3de63b5).
⚠️ Report is 1 commits behind head on alpha.

Additional details and impacted files
@@           Coverage Diff           @@
##            alpha   #10846   +/-   ##
=======================================
  Coverage   94.17%   94.17%           
=======================================
  Files         193      193           
  Lines       17379    17379           
  Branches      246      246           
=======================================
  Hits        16367    16367           
  Misses        991      991           
  Partials       21       21           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mtrezza
mtrezza merged commit 3e89f2b into parse-community:alpha Oct 29, 2026
25 checks passed
@mtrezza
mtrezza deleted the tests/role-name-reuse-restricted-clp branch October 29, 2026 16:11
@parseplatformorg

Copy link
Copy Markdown
Contributor

🎉 This change has been released in version 9.10.8-alpha.2

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:released-alpha Released as alpha version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants