Feature Request: Access Control for Viewing Articles

未关闭
#1,264 2 条评论 4 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 6 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
go

调研方向

由于 issue 中没有确定任何文件、测试或入口点,因此请先在 repository 中定位文章浏览、用户组和权限管理的入口点。要视为完成,需要达成一致的访问控制设计、文章到用户组的权限、对未授权查看者的强制执行,以及明确定义的拒绝或重定向响应。

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

描述

new-feature

Is your feature request related to a problem? Please describe

Currently, all users can browse all articles without any access restrictions. However, in some cases, we need to limit access so that only specific user groups can view certain articles.

Describe the solution you'd like

I would like to request a permission-based access control system for browsing articles. Specifically:

Each article should have an associated access group.
Only users belonging to the assigned group should be able to view the article.
Unauthorized users should receive a "Permission Denied" message or be redirected to a different page.

Describe alternatives you've considered

A few potential solutions could be:

Role-based access control (RBAC): Define roles (e.g., admin, editor, viewer) and associate them with article access.
Group-based permissions: Users can belong to different groups, and articles can be restricted to specific groups.
Tag-based restrictions: Articles could be tagged with access control levels (e.g., "internal only", "public").

Additional context

This feature would enhance security and provide more control over sensitive or internal articles.
It would be helpful if there were an admin panel where permissions could be managed easily.

主要语言
Go
星标
15.7k
派生
1.4k
平均合并
9 天 6 小时
30 天内合并 PR
8

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

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

apache/answer 的其他 Issue

查看 apache/answer 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

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