Decide: keep or remove g2 row rendering from schema-defined roles
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 15/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- python
- Lĩnh vực
- authorization
Hướng nghiên cứu
Start with ADR 0034 at docs/decisions/0034-permission-dependencies-schema.rst and the discussion in PR #601, then read the earlier issue #523 for context. The payload does not name the renderer code that emits g2 rows from depends_on, so locate it before judging maintenance cost. Done means a recorded keep-or-remove decision, with rationale added to ADR 0034 or a deprecation timeline.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Background
ADR 0034 (Permission Dependencies in Authorization Schema) defines how permission dependencies are declared in the authorization schema via an optional depends_on field on permissions. The ADR includes rendering Casbin g2 (action grouping) rows from these dependencies, even though schema-defined roles must list every dependency explicitly.
Current state: The renderer generates g2 rows from the schema's depends_on declarations, maintaining them alongside role definitions in the Casbin policy. This duplicates information already present in role declarations.
Rationale in ADR: g2 rows serve a dual purpose:
- Visibility in the Casbin policy when consumed directly or for debugging
- Safety net for database-only roles not validated against the schema
Scope of work
Decide whether the value of g2 rendering justifies its ongoing maintenance cost:
- Retention case: Keep g2 rendering for clarity when debugging/auditing Casbin policy directly, and as a safety net for unvalidated database-only roles.
- Removal case: Rely entirely on explicit permission listing in role definitions; schema roles are authoritative; no need for g2 duplication.
Trade-offs to evaluate:
- Debuggability: Direct visibility of g2 rows in the policy (retention helps here)
- Schema authority: Schema-defined roles list all dependencies; g2 becomes redundant
- Maintenance: Cost of keeping renderer logic to manage g2 rows
- Consistency: Risk of drift if g2 rows diverge from schema declarations
Acceptance criteria
- A decision is made: keep g2 rendering or remove it entirely
- Decision includes rationale on debuggability vs redundancy trade-off
- If kept: document in ADR 0034 why g2 rows are rendered despite schema roles being authoritative
- If removed: outline deprecation timeline for existing installations
References
- PR: #601 — ADR 0034 PR with discussion
- ADR: 0034 — Permission Dependencies in Authorization Schema
- Related: #523 — Original permission dependencies issue
- Ngôn ngữ chính
- Python
- Star
- 0
- Fork
- 10
- Merge trung bình
- 5 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 23
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của openedx/openedx-authz
-
Add a course permission check to ContainerChildrenViewCó thể đã có người làm @BryanttV đã nhận 5 ngày trước. Đang mởwillow
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
openedx/openedx-authz#604 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Allow Course Editors to import YouTube transcripts and surface errorsCó thể đã có người làm @efortish đã nhận 5 ngày trước. Đang mởwillow
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
openedx/openedx-authz#597 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
willow
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
openedx/openedx-authz#579 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Bugs & MaintenanceĐang mởwillow
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 20/100
openedx/openedx-authz#616 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
discovery documentation
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
openedx/openedx-authz#613 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của openedx/openedx-authz
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
can4hou6joeng4/boss-agent-cli#1487 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
btclib-org/btclib-wallet#1045 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area-templates triage:bot-seen triage:needs-human
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
microsoft/aspire#22356 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100