Skip to content

Fix auth calls#10987

Merged
abnegate merged 1 commit into1.8.xfrom
fix-auth
Dec 18, 2025
Merged

Fix auth calls#10987
abnegate merged 1 commit into1.8.xfrom
fix-auth

Conversation

@abnegate
Copy link
Copy Markdown
Member

What does this PR do?

(Provide a description of what this PR does and why it's needed.)

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Screenshots may also be helpful.)

Related PRs and Issues

  • (Related PR or issue)

Checklist

  • Have you read the Contributing Guidelines on issues?
  • If the PR includes a change to an API's metadata (desc, label, params, etc.), does it also include updated API specs and example docs?

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Dec 18, 2025

📝 Walkthrough

Walkthrough

The pull request adds dependency injection of the Authorization class to two routing initialization functions in app/controllers/general.php. The changes update both function signatures to accept an Authorization parameter, add corresponding injection declarations to the initialization chains, and replace two static method calls (Authorization::disable() and Authorization::reset()) with instance method calls using the injected dependency.

Estimated Code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify both injection declarations (->inject('authorization')) are properly formed in the App initialization chains
  • Confirm all static Authorization:: method calls have been replaced with instance calls ($authorization->) in both affected functions
  • Ensure the function signature updates properly align with the injection declarations in both Router setup and certificate generation blocks

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description is a template with placeholders and no substantive content about the actual changes made in the pull request. Replace the template placeholders with actual details explaining what the PR does, why it's needed, and how to test the authorization-related changes.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fix auth calls' is directly related to the main change, which involves fixing authorization dependency injection and replacing static Authorization calls with injected instances.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-auth

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9bda831 and 0058e88.

📒 Files selected for processing (1)
  • app/controllers/general.php (3 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
app/controllers/general.php (4)
src/Appwrite/Platform/Modules/Sites/Http/Deployments/Create.php (1)
  • action (94-382)
src/Appwrite/Platform/Modules/Sites/Http/Deployments/Template/Create.php (1)
  • action (86-230)
src/Appwrite/Platform/Modules/Console/Http/Resources/Get.php (1)
  • action (67-139)
src/Appwrite/Utopia/Request.php (1)
  • Request (14-247)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Setup & Build Appwrite Image
  • GitHub Check: Setup & Build Appwrite Image
  • GitHub Check: scan
🔇 Additional comments (3)
app/controllers/general.php (3)

1037-1038: LGTM! Proper dependency injection pattern.

The addition of Authorization dependency injection follows the established pattern in the codebase. The injection declaration and parameter addition are correctly implemented.


1069-1069: LGTM! Correct transition from static to instance method.

The change from Authorization::disable() to $authorization->disable() properly uses the injected dependency and aligns with the pattern used throughout the codebase.


1125-1125: LGTM! Correct transition from static to instance method.

The change from Authorization::reset() to $authorization->reset() is correct and maintains consistency with the disable() call on line 1069. Using the injected instance ensures proper cleanup in the finally block.


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 and usage tips.

@github-actions
Copy link
Copy Markdown

Security Scan Results for PR

Docker Image Scan Results

Package Version Vulnerability Severity
libpng 1.6.51-r0 CVE-2025-66293 HIGH
libpng-dev 1.6.51-r0 CVE-2025-66293 HIGH

Source Code Scan Results

🎉 No vulnerabilities found!

@abnegate abnegate merged commit 1b6d51a into 1.8.x Dec 18, 2025
30 of 41 checks passed
@abnegate abnegate deleted the fix-auth branch December 18, 2025 12:59
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