Skip to content

Add teamId to project array in e2e test#10875

Merged
lohanidamodar merged 1 commit into1.8.xfrom
fix-wrong-user-type
Nov 27, 2025
Merged

Add teamId to project array in e2e test#10875
lohanidamodar merged 1 commit into1.8.xfrom
fix-wrong-user-type

Conversation

@lohanidamodar
Copy link
Copy Markdown
Member

@lohanidamodar lohanidamodar commented Nov 27, 2025

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 Nov 27, 2025

Caution

Review failed

Failed to post review comments

📝 Walkthrough

Walkthrough

This pull request introduces a comprehensive authentication and authorization refactoring, moving from Auth class methods to User-based implementations, while adding support for new features including CSV exports, screenshot/browser integration, email canonicalization, and password hash object abstraction. The changes span configuration, database schema modifications, API endpoint updates, and resource dependencies. Key additions include new email fields on users, a total parameter across list endpoints, transformations attribute for storage buckets, new hash object implementations replacing string-based hashing, and framework/template updates for TanStack Start and dark mode support.

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~90+ minutes

Areas requiring extra attention:

  • Authorization refactoring across controllers: Verify all Auth::isPrivilegedUser(...)User::isPrivileged(...) and Auth::isAppUser(...)User::isApp(...) migrations are semantically equivalent and maintain security boundaries across avatars.php, graphql.php, storage.php, teams.php, realtime.php, and shared/api/auth.php

  • Hash object abstraction in user creation: Validate the new createUser(Hash $hash, ...) signature properly handles all hash algorithm types (Argon2, Bcrypt, MD5, SHA, PHPass, Scrypt, Plaintext) and that hash object methods (getName(), getOptions(), hash()) are correctly invoked across all call sites in users.php

  • Email canonicalization fields: Review introduction of new email attributes (emailCanonical, emailIsFree, emailIsDisposable, emailIsCorporate, emailIsCanonical) in app/config/collections/common.php and ensure these are properly populated, indexed, and don't conflict with existing data

  • Storage transformations enforcement: Verify the new transformations bucket attribute and corresponding validation gates (STORAGE_BUCKET_TRANSFORMATIONS_DISABLED error) are consistently applied across file operations in storage.php and that permission checking properly uses User methods

  • Session/Token proof refactoring: Examine new Store, Token, and Password proof implementations in resources.php, teams.php, users.php, and realtime.php to ensure session validation, cookie handling, and secret hashing remain secure and compatible

  • CSV export/import migration logic: Validate the new CSV export endpoint and device routing changes (deviceForImports → deviceForMigrations) in migrations.php, including query validation and migration queue integration

  • Database document type registration: Confirm setDocumentType('users', User::class) additions across all database instances prevent document mapping issues and that User class properly extends Document where needed

  • List endpoint includeTotal parameter propagation: Check consistency of new total parameter and includeTotal flag handling across messaging, projects, storage, teams, vcs, and migrations endpoints to ensure totals are correctly computed as 0 when disabled

  • Nullable parameter wrapping: Review widespread use of Nullable(...) wrappers in messaging, projects, storage, and teams endpoints to ensure optional field handling doesn't introduce unexpected null-related bugs

  • Framework and template updates: Validate TanStack Start framework configuration in frameworks.php and templates/site.php, Flutter runtime version bump, and dark mode CSS in email templates function correctly

Pre-merge checks and finishing touches

❌ Failed checks (3 warnings)
Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title 'Add teamId to project array in e2e test' is specific and clearly describes the change (adding teamId to a project array in an e2e test), but the raw_summary shows extensive changes across 30+ files covering database collections, API endpoints, authentication systems, Docker configuration, and much more. The title does not reflect the actual scope and complexity of this changeset. Update the PR title to reflect the actual scope of changes, such as 'Migrate authentication and authorization from Auth class to User class' or provide a more comprehensive title that captures the major refactoring involved.
Description check ⚠️ Warning The PR description only contains the repository's PR template with empty sections and no actual content describing what the PR does, why it was needed, the test plan, or related issues. This does not match the massive changeset detailed in the raw_summary. Fill in the PR description with details about the major changes (e.g., authentication/authorization refactoring, new features like CSV exports, email canonicalization, etc.), the test plan, and any related issues or PRs.
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✨ 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-wrong-user-type

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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.

@lohanidamodar lohanidamodar changed the base branch from main to 1.8.x November 27, 2025 11:49
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Nov 27, 2025

Open in StackBlitz

npm i https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@10875

commit: 2fdfbf6

@github-actions
Copy link
Copy Markdown

Security Scan Results for PR

Docker Image Scan Results

Package Version Vulnerability Severity
imagemagick 7.1.2.3-r0 CVE-2025-62171 HIGH
imagemagick-c++ 7.1.2.3-r0 CVE-2025-62171 HIGH
imagemagick-dev 7.1.2.3-r0 CVE-2025-62171 HIGH
imagemagick-heic 7.1.2.3-r0 CVE-2025-62171 HIGH
imagemagick-jpeg 7.1.2.3-r0 CVE-2025-62171 HIGH
imagemagick-jxl 7.1.2.3-r0 CVE-2025-62171 HIGH
imagemagick-libs 7.1.2.3-r0 CVE-2025-62171 HIGH
imagemagick-openexr 7.1.2.3-r0 CVE-2025-62171 HIGH
imagemagick-webp 7.1.2.3-r0 CVE-2025-62171 HIGH
libecpg 17.6-r0 CVE-2025-12818 HIGH
libecpg-dev 17.6-r0 CVE-2025-12818 HIGH
libpq 17.6-r0 CVE-2025-12818 HIGH
libpq-dev 17.6-r0 CVE-2025-12818 HIGH
libxml2 2.13.8-r0 CVE-2025-49794 CRITICAL
libxml2 2.13.8-r0 CVE-2025-49796 CRITICAL
libxml2 2.13.8-r0 CVE-2025-49795 HIGH
libxml2 2.13.8-r0 CVE-2025-6021 HIGH
postgresql17-dev 17.6-r0 CVE-2025-12818 HIGH
github.com/containerd/containerd/v2 v2.0.2 CVE-2024-25621 HIGH
golang.org/x/crypto v0.31.0 CVE-2025-22869 HIGH
golang.org/x/oauth2 v0.24.0 CVE-2025-22868 HIGH
stdlib 1.22.10 CVE-2025-47907 HIGH
stdlib 1.22.10 CVE-2025-58183 HIGH
stdlib 1.22.10 CVE-2025-58186 HIGH
stdlib 1.22.10 CVE-2025-58187 HIGH

Source Code Scan Results

🎉 No vulnerabilities found!

@lohanidamodar lohanidamodar merged commit 95abe61 into 1.8.x Nov 27, 2025
47 of 92 checks passed
@lohanidamodar lohanidamodar deleted the fix-wrong-user-type branch November 27, 2025 11:54
@github-actions
Copy link
Copy Markdown

✨ Benchmark results

  • Requests per second: 1,121
  • Requests with 200 status code: 201,857
  • P99 latency: 0.174401736

⚡ Benchmark Comparison

Metric This PR Latest version
RPS 1,121 1,218
200 201,857 219,369
P99 0.174401736 0.167438891

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.

2 participants