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

我创建的一个role不应该被打上 系统保留的标签 #2844

Closed
minliacom opened this issue Dec 5, 2022 · 5 comments · Fixed by #2865 or halo-dev/console#749
Closed

我创建的一个role不应该被打上 系统保留的标签 #2844

minliacom opened this issue Dec 5, 2022 · 5 comments · Fixed by #2865 or halo-dev/console#749
Assignees
Labels
area/console Issues or PRs related to the Halo Console area/core Issues or PRs related to the Halo Core kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@minliacom
Copy link
Contributor

是什么版本出现了此问题?

2.0.0

使用的什么数据库?

H2

使用的哪种方式部署?

Docker

在线站点地址

No response

发生了什么?

我创建的一个role不应该被打上 系统保留的标签

image

相关日志输出

No response

附加信息

No response

@JohnNiang
Copy link
Member

/kind bug
/area core

感谢指出这个问题。太仔细了 👍

@f2c-ci-robot f2c-ci-robot bot added kind/bug Categorizes issue or PR as related to a bug. area/core Issues or PRs related to the Halo Core labels Dec 5, 2022
@ruibaby
Copy link
Member

ruibaby commented Dec 5, 2022

/milestone 2.0.1

@minliacom
Copy link
Contributor Author

感谢你们用心的努力工作,创造了这么好的产品。 /点赞 /点赞 /点赞 666 666

@JohnNiang JohnNiang added this to the 2.0.1 milestone Dec 5, 2022
@JohnNiang
Copy link
Member

/assign

@JohnNiang
Copy link
Member

/area console

Hi @halo-dev/sig-halo-console , please note that there are two places to adjust here:

  1. Role list
  2. Role detail

@f2c-ci-robot f2c-ci-robot bot added the area/console Issues or PRs related to the Halo Console label Dec 6, 2022
f2c-ci-robot bot pushed a commit that referenced this issue Dec 7, 2022
#### What type of PR is this?

/kind bug
/area core

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

Add forgotten label `rbac.authorization.halo.run/system-reserved` for system-reserved roles. See the screenshot below:

![image](https://user-images.githubusercontent.com/16865714/205936031-8a49d4ef-9d10-4c72-a125-973cd361771e.png)

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

Fixes #2844

#### Special notes for your reviewer:

For @halo-dev/sig-halo-console : We have to determine whether the role is system-reserved by checking if label `rbac.authorization.halo.run/system-reserved` is equal to `true`.

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

<!--
如果当前 Pull Request 的修改不会造成用户侧的任何变更,在 `release-note` 代码块儿中填写 `NONE`。
否则请填写用户侧能够理解的 Release Note。如果当前 Pull Request 包含破坏性更新(Break Change),
Release Note 需要以 `action required` 开头。
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->

```release-note
修复每个角色都显示系统保留标签的问题
```
f2c-ci-robot bot pushed a commit to halo-dev/console that referenced this issue Dec 7, 2022
#### What type of PR is this?

/kind improvement
/milestone 2.0.1

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

完善用户角色的相关逻辑。适配 halo-dev/halo#2865

1. 支持标识是否是系统保留角色。
2. 根据是否是系统保留角色,禁用修改和删除的操作。
3. 支持判断是否是超级管理员,如果是,默认勾选所有权限。
4. 优化 `包含 N 个权限` 文案的逻辑,超级管理员为 `包含所有权限`。
5. 优化 `基于此角色创建` 的逻辑,判断是否为超级管理员,如果是,需要设置所有角色模板到创建表单。

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

Fixes halo-dev/halo#2844

#### Screenshots:

<img width="1663" alt="image" src="https://user-images.githubusercontent.com/21301288/205965292-b8f8e556-e06b-422b-b0be-8d87a68f18be.png">
<img width="1661" alt="image" src="https://user-images.githubusercontent.com/21301288/205965333-1491c023-6726-4cdd-b970-d868a30f3296.png">

#### Special notes for your reviewer:

测试方式:

1. Halo 需要切换到 halo-dev/halo#2865 分支。
2. 测试角色相关的所有功能。

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


```release-note
完善 Console 端用户角色的相关逻辑
```
JohnNiang pushed a commit to JohnNiang/halo that referenced this issue Mar 2, 2023
#### What type of PR is this?

/kind improvement
/milestone 2.0.1

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

完善用户角色的相关逻辑。适配 halo-dev#2865

1. 支持标识是否是系统保留角色。
2. 根据是否是系统保留角色,禁用修改和删除的操作。
3. 支持判断是否是超级管理员,如果是,默认勾选所有权限。
4. 优化 `包含 N 个权限` 文案的逻辑,超级管理员为 `包含所有权限`。
5. 优化 `基于此角色创建` 的逻辑,判断是否为超级管理员,如果是,需要设置所有角色模板到创建表单。

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

Fixes halo-dev#2844

#### Screenshots:

<img width="1663" alt="image" src="https://user-images.githubusercontent.com/21301288/205965292-b8f8e556-e06b-422b-b0be-8d87a68f18be.png">
<img width="1661" alt="image" src="https://user-images.githubusercontent.com/21301288/205965333-1491c023-6726-4cdd-b970-d868a30f3296.png">

#### Special notes for your reviewer:

测试方式:

1. Halo 需要切换到 halo-dev#2865 分支。
2. 测试角色相关的所有功能。

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


```release-note
完善 Console 端用户角色的相关逻辑
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/console Issues or PRs related to the Halo Console area/core Issues or PRs related to the Halo Core kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
3 participants