fix(api): editing an SSO provider name returns 200 but keeps the old name

Đang mở Phù hợp với người mới
#8,022 1 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@officialasishkumar đang làm issue này rồi.

Từ ngày 7/11/2026.

  • #8219 của @officialasishkumar — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
72/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
postgresql, python
Lĩnh vực
authentication, backend

Hướng nghiên cứu

Bắt đầu từ OrganizationsService.update_provider trong api/ee/src/core/organizations/service.py, hàm này đặt name, slug và description lên đối tượng. Sau đó đọc OrganizationProvidersDAO.update trong api/ee/src/dbs/postgres/organizations/dao.py, hàm này chỉ ghi flags, secret_id và updated_at. Truyền ba trường đó qua và lưu chúng xuống đó. Hoàn thành khi sửa tên và đọc GET /api/organizations/providers/ trả về giá trị mới, được bao phủ bởi một bài test mới.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

What happens

An organization admin edits an SSO provider in Settings > Access and security and changes its name. The save succeeds with HTTP 200 and updated_at changes. But the provider list still shows the old name.

Found during the v0.128.3 staging QA in /m. The request body sent the new name, so the frontend is not the cause.

Steps to reproduce

  1. On an enterprise-plan organization, add an SSO provider.
  2. Edit it and change only the name. Save.
  3. GET /api/organizations/providers/ returns the old name.

Expected

The new name is saved and shown. The same likely applies to slug and description.

Likely cause

OrganizationsService.update_provider (api/ee/src/core/organizations/service.py) sets provider.name, provider.slug and provider.description on the object from dao.get_by_id. Then it calls OrganizationProvidersDAO.update (api/ee/src/dbs/postgres/organizations/dao.py), which loads the row again and writes only flags, secret_id and updated_at. So name, slug and description never reach the database.

Fix

Pass name, slug and description to OrganizationProvidersDAO.update and write them there. Add a test that edits the name and reads it back.

Ngôn ngữ chính
TypeScript
Star
4.8k
Fork
690
Merge trung bình
23 giờ 26 phút
Pull request đã merge (30 ngày)
507

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Agenta-AI/agenta

Tất cả issue của Agenta-AI/agenta

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.