Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

匿名用户需要限制部分编辑功能 #2775

Closed
wan92hen opened this issue Nov 25, 2022 · 9 comments · Fixed by halo-dev/console#844
Closed

匿名用户需要限制部分编辑功能 #2775

wan92hen opened this issue Nov 25, 2022 · 9 comments · Fixed by halo-dev/console#844
Assignees
Labels
kind/improvement Categorizes issue or PR as related to a improvement. triage/needs-information Indicates an issue needs more information in order to work on it.
Milestone

Comments

@wan92hen
Copy link
Collaborator

你当前使用的版本

2.0.0-rc.1

描述一下此特性

在 rc.1 版本中,匿名用户会出现用户列表中,并且该用户能进行的操作与其他用户相同。作为系统内置的特殊用户,应当对其进行特殊处理。

可参考的处理方式有:

  1. 控制台隐藏该用户;
  2. 限制对该用户的部分操作,包括修改密码、删除;

附加信息

No response

@JohnNiang
Copy link
Member

  1. 修改匿名用户的密码不影响匿名用户的功能。
  2. 删除匿名用户后,可能会导致公开资源无法访问。
  3. 重启 Halo 后会自动重置匿名用户信息。
  4. 建议不隐藏匿名用户,未来方便给匿名用户分配更多的权限,或者直接禁用匿名用户。

@guqing
Copy link
Member

guqing commented Nov 25, 2022

关于第二点,匿名用户的密码是否被修改或清空都不会对此用户产生影响,匿名用户不需要绑定任何用户也具有 anoymous 角色
匿名用户不允许登录,但可以为其分配角色,如果分配了角色则任何用户都将拥有匿名用户拥有的所有权限
参考:https://docs.spring.io/spring-security/reference/servlet/authentication/anonymous.html

@wan92hen
Copy link
Collaborator Author

关于第二点,匿名用户的密码是否被修改或清空都不会对此用户产生影响,匿名用户不需要绑定任何用户也具有 anoymous 角色 匿名用户不允许登录,但可以为其分配角色,如果分配了角色则任何用户都将拥有匿名用户拥有的所有权限

密码实际不起作用的情况下,不是更应该把修改密码功能在控制台屏蔽掉吗?

@guqing
Copy link
Member

guqing commented Nov 25, 2022

关于第二点,匿名用户的密码是否被修改或清空都不会对此用户产生影响,匿名用户不需要绑定任何用户也具有 anoymous 角色 匿名用户不允许登录,但可以为其分配角色,如果分配了角色则任何用户都将拥有匿名用户拥有的所有权限

密码实际不起作用的情况下,不是更应该把修改密码功能在控制台屏蔽掉吗?

这就要看怎么理解了,站在一个 User 模型的角度上,它是具有密码属性的,但是站在系统的角度上,每个人都是 annomousUser 是不允许登录到后台的

@JohnNiang
Copy link
Member

/triage needs-information
/kind improvement

@f2c-ci-robot f2c-ci-robot bot added triage/needs-information Indicates an issue needs more information in order to work on it. kind/improvement Categorizes issue or PR as related to a improvement. labels Nov 25, 2022
@chengfeiyue
Copy link
Contributor

Anonymous User用户被删除之后,导致访问控制台页面报“资源不存在”。F12查看结果:
image

image
建议屏蔽“资源不存在”

@ruibaby
Copy link
Member

ruibaby commented Feb 10, 2023

我将在 Console 端屏蔽 annomousUser 这个账户。

/assign

@ruibaby ruibaby added this to the 2.3.x milestone Feb 10, 2023
@wan92hen
Copy link
Collaborator Author

我将在 Console 端屏蔽 annomousUser 这个账户。

/assign

这样的话之前讨论过的自定义匿名用户的权限场景该如何处理?

@ruibaby
Copy link
Member

ruibaby commented Feb 10, 2023

我将在 Console 端屏蔽 annomousUser 这个账户。

/assign

这样的话之前讨论过的自定义匿名用户的权限场景该如何处理?

暂不考虑,当前这个匿名用户并没有实际的用途。

f2c-ci-robot bot pushed a commit to halo-dev/console that referenced this issue Feb 10, 2023
#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

在用户管理列表隐藏 anonymousUser 用户,anonymousUser 暂时没有实际用途。

#### Which issue(s) this PR fixes:

Fixes halo-dev/halo#2775 (comment)

#### Screenshots:

<img width="1410" alt="image" src="https://user-images.githubusercontent.com/21301288/217997078-5e2e0724-5f22-45dc-a9c6-ee42254c9bd7.png">


#### Special notes for your reviewer:

测试方式:

1. 进入 Console 的用户管理,检查是否有名为 Anonymous User 的用户即可。

#### Does this PR introduce a user-facing change?

```release-note
在 Console 端的用户管理中隐藏 `Anonymous User` 用户。
```
@ruibaby ruibaby modified the milestones: 2.3.x, 2.3.0 Feb 10, 2023
JohnNiang pushed a commit to JohnNiang/halo that referenced this issue Mar 2, 2023
#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

在用户管理列表隐藏 anonymousUser 用户,anonymousUser 暂时没有实际用途。

#### Which issue(s) this PR fixes:

Fixes halo-dev#2775 (comment)

#### Screenshots:

<img width="1410" alt="image" src="https://user-images.githubusercontent.com/21301288/217997078-5e2e0724-5f22-45dc-a9c6-ee42254c9bd7.png">


#### Special notes for your reviewer:

测试方式:

1. 进入 Console 的用户管理,检查是否有名为 Anonymous User 的用户即可。

#### Does this PR introduce a user-facing change?

```release-note
在 Console 端的用户管理中隐藏 `Anonymous User` 用户。
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/improvement Categorizes issue or PR as related to a improvement. triage/needs-information Indicates an issue needs more information in order to work on it.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants