Commit Graph

5908 Commits (816ea2457184c6ed7c71de9c6181ee0d0eb3b3bf)
 

Author SHA1 Message Date
ytqh 816ea24571 Apply code formatting with ruff formatter
- Fixed formatting issues across 23 files
- Ensured all linting checks pass with uv run ruff check
- Code now follows consistent formatting standards
- No functional changes, only formatting improvements

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
11 months ago
ytqh de684cdd21 Add manual API test script for open email registration validation
- Tests verification code sending for all email domains (edu, gmail, company)
- Validates that email domain restrictions have been successfully removed
- Confirms proper error handling for invalid emails and codes
- Script focuses on verification code sending (step 1 of registration)
- Provides comprehensive testing for development and validation

Test results confirm verification codes are sent to ALL email types,
proving the open email registration feature works correctly.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
11 months ago
ytqh f1080f060c feat: Implement open email registration with conditional organization assignment
- Remove email domain validation requirement from registration endpoint
- Implement conditional organization assignment logic (auto-assign if domain match, else NULL)
- Allow users to register with any email address without requiring organization match
- Maintain backward compatibility for domain-matched emails (auto-assign to organization)
- Remove unused OrganizationNotFoundError import and fix code style

Key Changes:
- Modified EmailCodeLoginApi to allow registration without organization assignment
- Users with matching email domains are auto-assigned to organizations
- Users without matching domains can register and use platform with organization_id=NULL
- Prepared foundation for future organization invitation system

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
11 months ago
ytqh bba1d844e4 feat: Add database migration documentation and prepare for open email registration
- Add comprehensive database migration section to CLAUDE.md with Flask-Migrate commands
- Document migration patterns, guidelines, and file naming conventions
- Generate migration file for NULL organization indexes optimization
- Verify organization_id columns are already nullable in accounts and end_users tables
- Prepare database foundation for open email registration feature

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
11 months ago
ytqh 9468a3ce4e fix 11 months ago
ytqh fa19a56660 Fix admin validation to check organization_members instead of tenant_account_joins
- Replace TenantAccountJoinRole check with OrganizationMember role check
- Use OrganizationRole.ADMIN to validate admin privileges
- Query organization_members table using account's current_organization_id
- This fixes the issue where super_admin@test.edu couldn't login despite having admin role

The previous validation was checking the wrong role system (tenant roles vs organization roles).
Now it correctly validates against the organization membership role.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
11 months ago
ytqh 42b7ec95bf Integrate admin platform into Docker Compose stack
- Add admin service to docker-compose.yaml and docker-compose-template.yaml
  - Uses akiyu303/jim-admin:latest image
  - Configurable API URL via ADMIN_API_URL env var (defaults to https://qingsu.chat)
  - Includes health check on /admin endpoint

- Update nginx configuration to route /admin to admin container
  - Changed from host.docker.internal:3000 to admin:3000
  - Admin service now runs within Docker network

- Add admin service as nginx dependency to ensure proper startup order

This allows the admin platform to run as part of the complete jim-dify stack
instead of requiring a separate local development server.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
11 months ago
ytqh 03155f658d Add GitHub Action for automated backend deployment
- Build and push Docker image on PR merge or manual trigger
- Deploy to production server via SSH
- Uses Makefile for consistent build process

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
11 months ago
ytqh 0d5949ba46 Allow owner and admin roles to access admin API endpoints
- Modified admin API authentication to accept OWNER and ADMIN roles in addition to END_ADMIN
- This allows the same account to manage apps in Dify console and access admin statistics
- Fixes 401 errors when accessing admin platform with owner account

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
11 months ago
ytqh daa41fb0e1 init claude code md 12 months ago
ytqh c78f6225c4 format 12 months ago
ytqh 9a89ffecae update 12 months ago
ytqh f6416beca1 format 12 months ago
ytqh 55010d2c09 fix: new message duplicate 12 months ago
ytqh 426df30730 update wecom verify 1 year ago
ytqh fa629aceec fix 1 year ago
ytqh f08d557366 Revert "update"
This reverts commit 28d5697b37.
1 year ago
ytqh 97b7f47700 Revert "fix"
This reverts commit 3ea5a74d44.
1 year ago
ytqh 3ea5a74d44 fix 1 year ago
ytqh 28d5697b37 update 1 year ago
ytqh bce92efcbd Revert "update cert bot script"
This reverts commit 5786474540.
1 year ago
ytqh 5786474540 update cert bot script 1 year ago
ytqh 71997f4034 change nginx config 1 year ago
ytqh fce629c201 update nginx config 1 year ago
ytqh 944207f072 add langbot support 1 year ago
ytqh 20bbc35fbc add verify txt 1 year ago
ytqh 6ddf67f7e3 fix lint 1 year ago
ytqh 7364cb70cf Merge remote-tracking branch 'lefeng/main' into merge-lefeng 1 year ago
ytqh 4a1c53aa71 change invoke from to service api 1 year ago
ytqh f4e70c9312 fix: add more log 1 year ago
ytqh d451340128 feat: add logger 1 year ago
ytqh 9845b53113 fix memory 1 year ago
ytqh 21b8d76077 feat: fix memory 1 year ago
ytqh c7125a6152 fix: fix 1 year ago
ytqh 942161081e feat: fix failed profile update but commit to db change 1 year ago
ytqh b85ef8156b fix: add phone field as legacy support 1 year ago
ytqh dd331943e7 feat: add legacy phone field 1 year ago
ytqh bf9ef068a1 feat: update command for add admin cmd 1 year ago
ytqh acced21108 feat: format 1 year ago
ytqh 3a82e83dad feat: support email as admin login 1 year ago
ytqh 6f3bd7c6a5 feat: upgrade opentelemetry 1 year ago
ytqh 7ffb0df3fd fix: lint issue 1 year ago
ytqh cc625b387d Merge remote-tracking branch 'dify/main' into main 1 year ago
ytqh a83d644430 fix 1 year ago
ytqh 0cc956ace2 fix: fix image gen property err 1 year ago
湛露先生 c457e2b67a
clean docker compose env. (#19301)
Signed-off-by: zhanluxianshen <zhanluxianshen@163.com>
1 year ago
AichiB7A c4c20f6ed5
[Observability] Update counter to include http method and target (#19297)
Co-authored-by: QuantumGhost <obelisk.reg+git@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 year ago
-LAN- f23cf98317
refactor: Remove RepositoryFactory (#19176)
Signed-off-by: -LAN- <laipz8200@outlook.com>
1 year ago
zxhlyh a6827493f0
chore: slice workflow refresh draft hook (#19292) 1 year ago
QuantumGhost 9565fe9b1b
fix(api): fix alembic offline mode (#19285)
Alembic's offline mode generates SQL from SQLAlchemy migration operations,
providing developers with a clear view of database schema changes without
requiring an active database connection.

However, some migration versions (specifically bbadea11becb and d7999dfa4aae)
were performing database schema introspection, which fails in offline mode
since it requires an actual database connection.

This commit:
- Adds offline mode support by detecting context.is_offline_mode()
- Skips introspection steps when in offline mode
- Adds warning messages in SQL output to inform users that assumptions were made
- Prompts users to review the generated SQL for accuracy

These changes ensure migrations work consistently in both online and offline modes.

Close #19284.
1 year ago