Constraints of a grant in the role editor: sites, locales, fields, resources and a row rule (A-52)

未关闭
#3,430 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
52/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
csharp

调研方向

Read sections 4.15 and 10.7 of docs/planning/admin-technical-spec.md, then review the role editor work in A-32 and the row-rule registration issue #3417. Implement the grant constraints in the role editor and cover each constraint and request with component tests; add the locale-limited role end-to-end case. Done means the acceptance cases pass, including preserving resources and rejecting an unregistered rule on its field.

由索引模型根据 Issue 内容生成。

描述

area:admin type:feature

Problem

Rows 4.4 to 4.7 narrow a grant to sites, locales, fields and the rows a registered rule selects, and a grant may also be limited to resources, such as the media folders of decision record 0004. A-32 edits a role and its grants and keeps these constraints as it read them. Nothing in the admin sets or changes one.

Proposal

The constraints of a grant in the role editor of A-32 (4.15):

  • Sites, from the sites the caller may manage, and locales, from the locales of those sites.
  • Fields, for a permission of a content type, from the fields of that type in GET /schema.
  • A registered row rule, picked from the rules registered for the grant's content type (#3417). Until that route is merged, a stored rule is kept and shown by its name, and a new one is typed by name, with FCMS3042 shown on the field.
  • resources, which the specification of the editor leaves out and the API has: shown as stored and kept on a save. Where the admin can name them it does, and the media folders of a media grant are the first such case; any other kind stays a list of the ids as stored.
  • A constraint that does not narrow the grant is left out of the request, as the server stores it.

Acceptance

  • An administrator limits a grant of a content type to one site, two locales and three fields, saves, and reads the same back
  • A row rule is set on a grant and refused by name when it is not registered, with the refusal on its field
  • A grant limited to resources keeps them through an edit of its other constraints
  • A user of a role limited to one locale may change an entry in that locale only, checked through the admin
  • Component tests cover each constraint and the request they make; an end-to-end case limits a role to a locale and signs in as its user

Design: docs/planning/admin-technical-spec.md, sections 4.15 and 10.7 (A-52). Rows 4.4 to 4.7. Needs A-32, and #3417 for the list of row rules. Split from A-32 when A6 was planned. Size: M.

主要语言
C#
星标
567
派生
107
平均合并
1 小时 19 分钟
30 天内合并 PR
353

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

fluentcms/FluentCMS 的其他 Issue

查看 fluentcms/FluentCMS 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。