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

refactor: default is approved to reply to comments on the console-side #3363

Merged
merged 9 commits into from
Feb 24, 2023

Conversation

guqing
Copy link
Member

@guqing guqing commented Feb 22, 2023

What type of PR is this?

/kind improvement
/area core
/milestone 2.3.x

What this PR does / why we need it:

Console 端创建回复不再需要审核
但需要注意的是目前无法区分是否为管理员,所以如果具有评论管理权限的用户在主题端登录回复还是需要审核。

Which issue(s) this PR fixes:

Fixes #3353

Special notes for your reviewer:

how to test it?

  1. 在主题端创建评论和回复都需要审核
  2. 在 console 端回复不需要审核

/cc @halo-dev/sig-halo

Does this PR introduce a user-facing change?

Console 端创建回复不再需要审核

@f2c-ci-robot f2c-ci-robot bot added this to the 2.3.x milestone Feb 22, 2023
@f2c-ci-robot f2c-ci-robot bot added kind/improvement Categorizes issue or PR as related to a improvement. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Feb 22, 2023
@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Feb 22, 2023

@guqing: GitHub didn't allow me to request PR reviews from the following users: halo-dev/sig-halo.

Note that only halo-dev members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

What type of PR is this?

/kind improvement
/area core
/milestone 2.3.x

What this PR does / why we need it:

Console 端创建回复不再需要审核
但需要注意的是目前无法区分是否为管理员,所以如果具有评论管理权限的用户在主题端登录回复还是需要审核。

Which issue(s) this PR fixes:

Fixes #3353

Special notes for your reviewer:

how to test it?

  1. 在主题端创建评论和回复都需要审核
  2. 在 console 端回复不需要审核

/cc @halo-dev/sig-halo

Does this PR introduce a user-facing change?

Console 端创建回复不再需要审核

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 f2c-ci-robot bot added the area/core Issues or PRs related to the Halo Core label Feb 22, 2023
Copy link
Member

@JohnNiang JohnNiang left a comment

Choose a reason for hiding this comment

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

IMO,我们可以提供两个接口用于评论回复,一个需要审核,一个不需要审核。我们在配置权限规则的时候区分一下。例如:管理员角色中包含“不需要审核评论接口”规则,普通用户角色中只包含“需要审核评论接口”。

@guqing
Copy link
Member Author

guqing commented Feb 22, 2023

IMO,我们可以提供两个接口用于评论回复,一个需要审核,一个不需要审核。我们在配置权限规则的时候区分一下。例如:管理员角色中包含“不需要审核评论接口”规则,普通用户角色中只包含“需要审核评论接口”。

但是并不能解决管理员在主题端回复还是需要审核的问题吧 这个只能后台用户哪些需要审核和不需要审核的问题,主题端回复的 api 是无法判断权限的

@f2c-ci-robot f2c-ci-robot bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 23, 2023
# Conflicts:
#	src/main/java/run/halo/app/content/comment/ReplyServiceImpl.java
@f2c-ci-robot f2c-ci-robot bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 24, 2023
@JohnNiang
Copy link
Member

Hi @guqing,需要解决一下冲突。

@guqing
Copy link
Member Author

guqing commented Feb 24, 2023

Hi @guqing,需要解决一下冲突。

Done

@codecov
Copy link

codecov bot commented Feb 24, 2023

Codecov Report

Merging #3363 (9489066) into main (f1ec6ce) will decrease coverage by 0.01%.
The diff coverage is 21.87%.

@@             Coverage Diff              @@
##               main    #3363      +/-   ##
============================================
- Coverage     60.11%   60.10%   -0.01%     
- Complexity     2390     2391       +1     
============================================
  Files           388      388              
  Lines         12328    12330       +2     
  Branches        987      989       +2     
============================================
  Hits           7411     7411              
- Misses         4447     4449       +2     
  Partials        470      470              
Impacted Files Coverage Δ
...run/halo/app/content/comment/ReplyServiceImpl.java 1.51% <0.00%> (+0.24%) ⬆️
...o/app/core/extension/endpoint/CommentEndpoint.java 66.15% <0.00%> (-4.34%) ⬇️
...halo/app/theme/endpoint/CommentFinderEndpoint.java 86.15% <38.88%> (-7.97%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

@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 Feb 24, 2023
@LIlGG
Copy link
Member

LIlGG commented Feb 24, 2023

/lgtm

image

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Feb 24, 2023
@f2c-ci-robot f2c-ci-robot bot removed the lgtm Indicates that a PR is ready to be merged. label Feb 24, 2023
Copy link
Member

@JohnNiang JohnNiang left a comment

Choose a reason for hiding this comment

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

/approve

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.

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Feb 24, 2023
@f2c-ci-robot f2c-ci-robot bot removed the lgtm Indicates that a PR is ready to be merged. label Feb 24, 2023
Copy link
Member

@JohnNiang JohnNiang 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 Feb 24, 2023
@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Feb 24, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JohnNiang, 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

@JohnNiang JohnNiang merged commit adff2a7 into halo-dev:main Feb 24, 2023
@ruibaby ruibaby modified the milestones: 2.3.x, 2.3.0 Feb 24, 2023
@guqing guqing deleted the refactor/3353 branch February 24, 2023 10:55
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/improvement Categorizes issue or PR as related to a improvement. 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.

在 Console 端回复评论需要审核
4 participants