Skip to content

Redirect in backend when system check rights#1502

Open
gviabcua wants to merge 1 commit into
wintercms:developfrom
gviabcua:patch-1
Open

Redirect in backend when system check rights#1502
gviabcua wants to merge 1 commit into
wintercms:developfrom
gviabcua:patch-1

Conversation

@gviabcua

@gviabcua gviabcua commented Jul 14, 2026

Copy link
Copy Markdown
Contributor
2026-07-14_08-07 Fixed error of redirect in backend if was logged out when system cant check rights

Summary by CodeRabbit

  • Bug Fixes
    • Improved stability when account information is unavailable during CMS access checks.
    • Prevented errors when validating requests or loading template and component lists without an authenticated account.
    • Restricted permission-dependent content from appearing when access cannot be verified.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 27222105-f0fb-4b14-bbe2-b833e193d90b

📥 Commits

Reviewing files that changed from the base of the PR and between 8a43ba2 and 6c405ce.

📒 Files selected for processing (1)
  • modules/cms/controllers/Index.php

Walkthrough

Updated Index controller permission checks to use null-safe user access. The constructor now skips permission-gated template, component, and asset registrations when no user is available. validateRequestType() also avoids failing during authorization checks when the user is null.

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

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is related to the backend permission-check fix, though it is somewhat awkward and broad.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant