Commit Graph

3681 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 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 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 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
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
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
ytqh 4a60dd5e03 fix: lint err 1 year ago
ytqh 3d2b3a53e6 feat: adapt aliyun otel 1 year ago
Good Wood 0b44791eae
feat: add mode for /info api (#19264) 1 year ago
Novice 0cfc82d731
fix(structured-output): reasoning model's json format parsing (#19261) 1 year ago
Bowen Liang 8537abfff8
chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 1 year ago
Yeuoly 8ac3a223a8
fix(api): add missing INNER_API_KEY to InnerAPIConfig (#19166) 1 year ago
kenwoodjw c5568f756f
fix basic auth if not base64 encode (#19242)
Signed-off-by: kenwoodjw <blackxin55+@gmail.com>
1 year ago
Bowen Liang 22f5af9987
fix: support non-ascii charactors in filename of the tool files (#19228) 1 year ago
Bowen Liang e352ab2bdd
chore: required pip and performance improvment in mypy checks (#19225) 1 year ago
ytqh 8a190d7dc5 feat: add mpeg support 1 year ago
ytqh 38d3687994 fix: fix lint error 1 year ago
ytqh a222a038a2 feat: add log for asr 1 year ago
ytqh 62ade5ecd3 opt: opt debug demo 1 year ago
ytqh 4085589695 update 1 year ago
ytqh c90590ed62 fix: get_admin_through_phone check logic 1 year ago
ytqh d11ebef66f update 1 year ago
ytqh e83e09e85f chore: format 1 year ago