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

Add forgotten label for system-reserved roles #2865

Merged
merged 1 commit into from
Dec 7, 2022

Conversation

JohnNiang
Copy link
Member

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

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?

修复每个角色都显示系统保留标签的问题

@f2c-ci-robot f2c-ci-robot bot added kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. area/core Issues or PRs related to the Halo Core labels Dec 6, 2022
Copy link
Member

@ruibaby ruibaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

建议根据 halo-dev/console#749 测试角色相关的所有功能。

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Dec 6, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ruibaby

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 6, 2022
Copy link
Member

@guqing guqing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Dec 7, 2022
@f2c-ci-robot f2c-ci-robot bot merged commit 5f0539d into halo-dev:main Dec 7, 2022
@JohnNiang
Copy link
Member Author

/cherry-pick release-2.0

@halo-dev-bot
Copy link
Collaborator

@JohnNiang: failed to push cherry-picked changes in GitHub: pushing failed, output: "To https://github.com/halo-dev-bot/halo\n ! [remote rejected] cherry-pick-2865-to-release-2.0 -> cherry-pick-2865-to-release-2.0 (refusing to allow a Personal Access Token to create or update workflow .github/workflows/halo.yaml without workflow scope)\nerror: failed to push some refs to 'https://github.com/halo-dev-bot/halo'\n", error: exit status 1

In response to this:

/cherry-pick release-2.0

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@JohnNiang
Copy link
Member Author

/cherry-pick release-2.0

@halo-dev-bot
Copy link
Collaborator

@JohnNiang: new pull request created: #2869

In response to this:

/cherry-pick release-2.0

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

f2c-ci-robot bot pushed a commit that referenced this pull request Dec 7, 2022
This is an automated cherry-pick of #2865

/assign JohnNiang

```release-note
修复每个角色都显示系统保留标签的问题
```
@JohnNiang JohnNiang added this to the 2.1.x milestone Dec 7, 2022
f2c-ci-robot bot pushed a commit to halo-dev/console that referenced this pull request 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 JohnNiang modified the milestones: 2.1.x, 2.1.0 Dec 14, 2022
JohnNiang pushed a commit to JohnNiang/halo that referenced this pull request 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 端用户角色的相关逻辑
```
@JohnNiang JohnNiang deleted the bug/role-label branch March 15, 2023 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/core Issues or PRs related to the Halo Core kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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