#### What type of PR is this?
/kind improvement
/milestone 2.0
#### What this PR does / why we need it:
优化用户登录的逻辑。 适配:https://github.com/halo-dev/halo/pull/2528
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/2506
#### Special notes for your reviewer:
#### Does this PR introduce a user-facing change?
```release-note
优化用户登录的逻辑
```
#### What type of PR is this?
/kind improvement
/kind api-change
/area core
/milestone 2.0
#### What this PR does / why we need it:
Please see b092b390b7/docs/authentication/README.md
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/2506
#### Special notes for your reviewer:
#### Does this PR introduce a user-facing change?
```release-note
优化系统登录和登出逻辑
```
#### What type of PR is this?
/kind documentation
/milestone 2.0
#### What this PR does / why we need it:
更新 README,提供 Halo 2.0 的演示环境信息。
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0
#### What this PR does / why we need it:
优化系统角色模板配置
- 认证用户仅具有名为 system-states 的 ConfigMap 查看权限而非所有 ConfigMap查看权限
- 主题和插件的管理权限目前需要单独勾选 ConfigMap 和 Setting 的权限才可以看到表单和值
#### Which issue(s) this PR fixes:
Fixes#2523
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind documentation
#### What this PR does / why we need it:
添加 PR 模板和删除 auto assign 的配置文件。 Ref https://github.com/halo-dev/console/pull/569
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo-console
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/milestone 2.0
#### What this PR does / why we need it:
Ref https://github.com/halo-dev/halo/pull/2521 我们已经将 halo-admin 的命名改为了 console,所以相关命名需要同步修改。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/2519
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo-console
测试方式:
1. 需要 `pnpm install && pnpm build:packages`
2. 测试后台功能是否正常。
PS:将在此 PR 合并之后发布 `@halo-dev/console-shared` 包到 npm。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0
#### What this PR does / why we need it:
重构插件反向代理注册方式
#### Which issue(s) this PR fixes:
Fixes#2520
#### Special notes for your reviewer:
How to test:
1. clone 项目 https://github.com/halo-sigs/plugin-comment-widget 后 build 一个 jar
2. 将该 jar 作为一个插件安装到系统并启用它
3. 访问插件提供的反向代理资源
```
curl --location --request GET 'http://localhost:8090/assets/PluginCommentWidget/static/comment-widget.iife.js'
```
期望得到结果
4. 停用插件,重复 Step 3,期望得到 404
5. 重复数次 Step 3-4 均与期望相同即可
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind bug
/area core
/milestone 2.0
#### What this PR does / why we need it:
BasePlugin 持有了一个当前插件的 PluginApplicationContext 当插件停止后重新启用会获取到旧的 PluginApplicationContext,之前之所以这样写的目的只是插件的这个 BasePlugin 不支持依赖注入,目前已经支持所以不在这样解决问题
日志:
```
Caused by: java.lang.IllegalStateException: run.halo.app.plugin.PluginApplicationContext@6baf2671 has been closed already
at org.springframework.context.support.AbstractApplicationContext.assertBeanFactoryActive(AbstractApplicationContext.java:1125) ~[spring-context-6.0.0-M5.jar:6.0.0-M5]
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1158) ~[spring-context-6.0.0-M5.jar:6.0.0-M5]
at run.halo.app.plugin.SpringExtensionFactory.create(SpringExtensionFactory.java:102) ~[classes/:2.0.0-alpha.1]
at org.pf4j.ExtensionWrapper.getExtension(ExtensionWrapper.java:37) ~[pf4j-3.7.0.jar:3.7.0]
at org.pf4j.AbstractPluginManager.getExtensions(AbstractPluginManager.java:971) ~[pf4j-3.7.0.jar:3.7.0]
at run.halo.app.plugin.HaloPluginManager.getExtensions(HaloPluginManager.java:118) ~[classes/:2.0.0-alpha.1]
at run.halo.app.plugin.ExtensionComponentsFinder.getExtensions(ExtensionComponentsFinder.java:36) ~[classes/:2.0.0-alpha.1]
at run.halo.app.theme.dialect.CommentElementTagProcessor.doProcess(CommentElementTagProcessor.java:49) ~[classes/:2.0.0-alpha.1]
at org.thymeleaf.processor.element.AbstractElementTagProcessor.process(AbstractElementTagProcessor.java:95) ~[thymeleaf-3.1.0.M2.jar:3.1.0.M2]
at org.thymeleaf.util.ProcessorConfigurationUtils$ElementTagProcessorWrapper.process(ProcessorConfigurationUtils.java:633) ~[thymeleaf-3.1.0.M2.jar:3.1.0.M2]
at org.thymeleaf.engine.ProcessorTemplateHandler.handleStandaloneElement(ProcessorTemplateHandler.java:918) ~[thymeleaf-3.1.0.M2.jar:3.1.0.M2]
at org.thymeleaf.engine.StandaloneElementTag.beHandled(StandaloneElementTag.java:228) ~[thymeleaf-3.1.0.M2.jar:3.1.0.M2]
at org.thymeleaf.engine.Model.process(Model.java:282) ~[thymeleaf-3.1.0.M2.jar:3.1.0.M2]
at org.thymeleaf.engine.ProcessorTemplateHandler.handleStandaloneElement(ProcessorTemplateHandler.java:1204) ~[thymeleaf-3.1.0.M2.jar:3.1.0.M2]
at org.thymeleaf.engine.StandaloneElementTag.beHandled(StandaloneElementTag.java:228) ~[thymeleaf-3.1.0.M2.jar:3.1.0.M2]
at org.thymeleaf.engine.Model.process(Model.java:282) ~[thymeleaf-3.1.0.M2.jar:3.1.0.M2]
at org.thymeleaf.engine.ProcessorTemplateHandler.handleOpenElement(ProcessorTemplateHandler.java:1587) ~[thymeleaf-3.1.0.M2.jar:3.1.0.M2]
at org.thymeleaf.engine.OpenElementTag.beHandled(OpenElementTag.java:205) ~[thymeleaf-3.1.0.M2.jar:3.1.0.M2]
at org.thymeleaf.engine.TemplateModel.process(TemplateModel.java:136) ~[thymeleaf-3.1.0.M2.jar:3.1.0.M2]
at org.thymeleaf.engine.TemplateManager.parseAndProcess(TemplateManager.java:592) ~[thymeleaf-3.1.0.M2.jar:3.1.0.M2]
at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1103) ~[thymeleaf-3.1.0.M2.jar:3.1.0.M2]
at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1077) ~[thymeleaf-3.1.0.M2.jar:3.1.0.M2]
at run.halo.app.theme.engine.SpringWebFluxTemplateEngine.lambda$createFullStream$0(SpringWebFluxTemplateEngine.java:202) ~[classes/:2.0.0-alpha.1]
at reactor.core.publisher.MonoCreate.subscribe(MonoCreate.java:58) ~[reactor-core-3.5.0-M4.jar:3.5.0-M4]
at reactor.core.publisher.Mono.subscribe(Mono.java:4321) ~[reactor-core-3.5.0-M4.jar:3.5.0-M4]
at reactor.core.publisher.MonoSubscribeOn$SubscribeOnSubscriber.run(MonoSubscribeOn.java:126) ~[reactor-core-3.5.0-M4.jar:3.5.0-M4]
at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:84) ~[reactor-core-3.5.0-M4.jar:3.5.0-M4]
at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37) ~[reactor-core-3.5.0-M4.jar:3.5.0-M4]
at java.base/java.util.concurrent.FutureTask.run(Unknown Source) ~[na:na]
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:na]
at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
```
#### Which issue(s) this PR fixes:
Fixes #
#### Special notes for your reviewer:
how to test:
1. 安装一个插件
2. 启用它再停止它,如此反复,没有抛出异常即可
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/area core
/milestone 2.0
#### What this PR does / why we need it:
Add MySQL script to support running Halo with MySQL database due to https://github.com/jasync-sql/jasync-sql/issues/311 has been resolved.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/2464
#### Special notes for reviewers
Steps to test:
1. Start up MySQL. e.g.:
```yaml
version: '3.1'
services:
db:
image: mysql
# NOTE: use of "mysql_native_password" is not recommended: https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password
# (this is just an example, not intended to be a production configuration)
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_ROOT_PASSWORD: openmysql
ports:
- 3306:3306
adminer:
image: adminer
restart: always
ports:
- 8080:8080
```
```bash
docker-compose -f mysql.yaml up
```
2. Start Halo with `mysql` profile. e.g.:
```bash
./gradlew bootRun --args="--spring.profiles.active=mysql"
```
3. Validate the functionality of Halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind bug
/area core
/milestone 2.0
#### What this PR does / why we need it:
修复主题端内容页访问量统计接口角色规则动词配置错误问题
#### Which issue(s) this PR fixes:
Fixes#2507
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind documentation
#### What this PR does / why we need it:
See https://github.com/halo-dev/halo/pull/2078 for more.
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind documentation
/milestone 2.0
#### What this PR does / why we need it:
因为目前暂时没有提供 JAR 包,所以移除 README 有关使用 JAR 包运行的文档。
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind documentation
/milestone 2.0
#### What this PR does / why we need it:
更新 README
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo-console
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/kind improvement
/milestone 2.0
#### What this PR does / why we need it:
完善 UI 权限控制。适配 https://github.com/halo-dev/halo/pull/2488
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/2342
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo-console
测试方式:
1. Halo 需要使用 https://github.com/halo-dev/halo/issues/2342 PR 的分支。
2. 创建新的角色,并勾选需要测试的权限。
3. 创建新的用户并赋予新的角色。
4. 测试操作权限。
#### Does this PR introduce a user-facing change?
```release-note
完善 UI 权限控制
```
#### What type of PR is this?
/kind feature
/milestone 2.0
#### What this PR does / why we need it:
支持初始化默认数据。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/2428
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo-console
测试方式:
1. 清空数据库。
2. 启动之后登录即可跳转到初始化界面。
3. 测试初始化的功能是否正常。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0
#### What this PR does / why we need it:
修复文章和自定义页面的总评论数量统计取值错误
#### Which issue(s) this PR fixes:
Fixes #
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind documentation
/milestone 2.0
#### What this PR does / why we need it:
更新 README。
See https://github.com/halo-dev/halo/issues/2410 for more
#### Special notes for your reviewer:
/hold
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0
#### What this PR does / why we need it:
发布和更新文章及自定义页面时如果遇到乐观锁错误自动重试
#### Which issue(s) this PR fixes:
Fixes #
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0
#### What this PR does / why we need it:
补充角色模板
#### Which issue(s) this PR fixes:
Fixes#2342https://github.com/halo-dev/halo/issues/2391
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0
#### What this PR does / why we need it:
将 spring boot 的版本从 3.0.0-M5 降级到 3.0.0-M5 以解决 swragger 无法使用的问题
#### Which issue(s) this PR fixes:
Fixes #
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/milestone 2.0
#### What this PR does / why we need it:
- 支持在文章和自定义页面的管理列表显示访问数和评论数。
- 仪表盘支持显示整站的访问数。
适配 https://github.com/halo-dev/halo/pull/2476
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/2430
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo-console
测试方式:
1. Halo 需要 https://github.com/halo-dev/halo/pull/2476 PR 中的分支。
2. 需要执行 `pnpm install && pnpm build:packages`
3. 随机访问前台文章或者自定义页面,以及添加评论。
4. 查看后台是否正确统计文章浏览数和评论数。
TODO list:
- [ ] 更新 `@halo-dev/api-client`
#### Does this PR introduce a user-facing change?
```release-note
支持在文章和自定义页面的管理列表显示访问数和评论数
```
#### What type of PR is this?
/kind bug
/area core
/milestone 2.0
#### What this PR does / why we need it:
Fix the problem of granting role not taking effect.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/2490
#### Special notes for your reviewer:
Steps to test:
1. Create an user
2. Grant a role for the user
3. Check the user list
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/kind improvement
/milestone 2.0
#### What this PR does / why we need it:
添加插件管理筛选的支持。适配 https://github.com/halo-dev/halo/pull/2489
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/2470
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
/cc @halo-dev/sig-halo-console
测试方式:
1. Halo 需要切换到 https://github.com/halo-dev/halo/pull/2489 PR 的分支。
2. Console 需要 `pnpm install`
3. 安装若干插件,测试筛选和排序。
#### Does this PR introduce a user-facing change?
```release-note
插件管理支持筛选
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0
#### What this PR does / why we need it:
创建评论时 hidden 字段默认为 false
#### Which issue(s) this PR fixes:
Fixes #
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind bug
/area core
/milestone 2.0
#### What this PR does / why we need it:
Fix the problem of changing password not exist before.
#### Which issue(s) this PR fixes:
Partial Fixes https://github.com/halo-dev/halo/issues/2427
#### Special notes for your reviewer:
Steps to test:
1. Create an user and change his/her password
2. Login with the user and the password
#### Does this PR introduce a user-facing change?
```release-note
None
```