A role refused registration_info gets a forbidden toast on every Applications visit

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

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

Chưa có ai nhận issue này.

Đá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
74/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Lĩnh vực
api, frontend

Hướng nghiên cứu

Bắt đầu với src/features/instance/applications/hooks/useSupportsDeploymentSSE.ts và theo dõi cách truy vấn registration_info được cấu hình, bao gồm các tùy chọn thử lại và metadata. Sau đó đọc queryErrorHandler cùng phần xử lý liên quan đến retryUnlessRejected() hoặc việc từ chối được đề cập trong issue. Hoàn tất khi một vai trò bị từ chối registration_info không còn phát sinh các yêu cầu lặp lại hoặc toast Forbidden mỗi lần truy cập Applications, trong khi staging vẫn không khả dụng nếu không có phiên bản.

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

Mô tả

Problem

A role whose operations allowlist doesn't include registration_info sees a "forbidden" error toast every time it opens the Applications page.

useStagedDeploymentsAvailable (src/features/instance/applications/hooks/useSupportsDeploymentSSE.ts:34) queries registration_info for every user, with React Query's default three retries. That hook is behind the always-mounted redeploy dialog. Harper's allowlist gate refuses the operation to such a role with a 403. Checked on Harper 5.4.0-beta.2: a role with operations: ["deploy_component"] gets 403 for both registration_info and get_configuration. The query retries three times, and then queryErrorHandler toasts it.

Nothing breaks: without a version, staging isn't offered. The only effect is the noise, and the four requests on every visit.

Fix

Either skip the query for a role that can't call it, or give it retry: retryUnlessRejected() and meta: { refusalIsAnAnswer: true }. That meta flag is added to queryErrorHandler in the private-database-copy PR for get_configuration.

Review-Deferral: edc14630cb6cf70a severity=minor category=reliability

🤖 Generated by Anthropic Claude (Claude Code); posted via @dawsontoth.

Ngôn ngữ chính
TypeScript
Star
5
Fork
4
Merge trung bình
1 ngày 20 giờ
Pull request đã merge (30 ngày)
137

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 HarperFast/studio

Tất cả issue của HarperFast/studio

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.