Commit Graph

118 Commits (696a9ad2ee5807ffa5637061cd059b28d835f9f2)

Author SHA1 Message Date
Li 696a9ad2ee
feat: 扩展 freemarker 实现 block (#1295)
* fix #950 附件不存在时删除报错的问题

* pref: 扩展 freemarker 增加 block 功能

close #1292

* checkStyle

* add unit test

* update test
2021-03-05 23:37:02 +08:00
John Niang 65ed8b84af
Cache current theme in theme repository (#1286) 2021-02-25 22:39:40 +08:00
Elvys Soares cdc15942cf
pref: grouping assertions (#1273)
* Grouping assertions

Signed-off-by: Elvys Soares <eas5@cin.ufpe.br>

* Grouping assertions

Signed-off-by: Elvys Soares <eas5@cin.ufpe.br>

* Grouping assertions

Signed-off-by: Elvys Soares <eas5@cin.ufpe.br>

* fix: code style check.

Co-authored-by: Ryan Wang <i@ryanc.cc>
2021-02-19 21:14:51 +08:00
John Niang 30c9baf92b
Fix theme updation error (#1217)
* Make rest controller loggable

* Refactor pull from git process

* Replace Callback interface with Consumer

* Tag theme fetch apis and services deprecated

* Add getAllBranchesTest

* Refactor theme fetcher partially

* Refactor theme property scanner

* Add ThemeFetcherComposite

* Add InputStreamThemeFetcher

* Accomplish multipart zip file theme fetcher

* Reformat ThemeServiceImpl

* Reformat codes

* Provide ThemeRepository

* Complete MultipartFileThemeUpdater

* Make CommonsMultipartResolver support put request method

* Replace some methods with ThemeRepository

* Add GitThemeUpdater

* Add merge two local repo test

* Refine merge process with two repos

* Add more test entry point in GitTest

* Add shutdown hook after creating temporary directory

* Add test: find commit by tag

* Refactor git clone process in GitThemeFetcher

* Refine merge process of two repo

* Make sure that RevWalk closed

* Fix FileUtils#findRootPath bug

* Add clean task before gradle check

* Add fallback theme fetcher

* Disable logback-test.xml

* Set testLogging.showStandardStreams with true

* Fix test error while missing halo-test folder

* Enhance git theme fetcher

* Add copy hidden folder test

* Refine GitThemeFetcherTest

* Accomplish GitThemeUpdater

* Accomplish theme update

* Fix checkstyle error

* Add more deprecated details
2021-01-27 00:16:31 +08:00
John Niang feab7c4b5f
Refactor checkstyle (#1241)
* Refactor checkstyle.xml and add .editorconfig

* Optimized imports

* Rearrange codes

* Fix check sytle error in source codes

* Reformat test codes

* Fix check style error in test codes

* Config checkstyle plugin

* Fix merge conflicts
2021-01-24 17:11:10 +08:00
Ryan Wang de5e968025
pref: clean unnecessary code. (#1237)
* pref: clean unnecessary code.

* chore: change org.jetbrains.annotations.NotNull to org.springframework.lang.NonNull.
2021-01-24 14:53:32 +08:00
Raremaa 8ba115ffb6
feat: add api for markdown export (#1199)
* add API for markdown-export

* add front-matter support

* optimize fileName for markdown-export

* fornt-matter与正文中间增加换行符
2020-12-27 23:58:52 +08:00
Ryan Wang 6c04d5a30d
doc: update swagger contact email. (#1147) 2020-11-12 02:20:14 +08:00
John Niang 92eda2faf8
Fix failing tests (#1131) 2020-11-02 22:35:40 +08:00
John Niang 845fe1114f
Fix handling root theme folder unexpectedly (#1081)
* Fix handling root theme folder unexpectedly

* Ignore .git folder while finding root path
2020-09-24 00:16:02 +08:00
John Niang d0568686c0
Fix theme zip file upload bug and provide finding root folder function (#1080)
* Fix theme zip file upload bug and provide finding root folder function

* Update ThemeServiceImpl.java

Co-authored-by: Ryan Wang <i@ryanc.cc>
2020-09-23 20:20:52 +08:00
Ryan Wang fc5742eae8
chore: remove hazelcast cache store. (#1076) 2020-09-22 01:20:05 +08:00
王存露 504e6e187e
fix: #897 && fix: halo-dev/halo-admin#236 (#1057)
* fix: #897

* fix: 网站备份时,上级目录不存在的问题 (#1056)

* 增加网站备份,临时文件不存在时创建

* 增加数据导出,临时文件不存在时创建

* 修改整站备份,数据导出,临时文件不存在时创建

* add: file upload unit test

* change : FileHandlersTest.java file format

* feat: #1065 (#1066)

* feat: #1065

* feat: #1065

* fix: #897

* add: file upload unit test

* change : FileHandlersTest.java file format

* fix: https://github.com/halo-dev/halo-admin/issues/236

* delete : FileHandlersTest.java
change : FilenameUtilsTest.java add file name double suffix test

Co-authored-by: bruin-sxk <45200590+bruin-sxk@users.noreply.github.com>
Co-authored-by: Ryan Wang <i@ryanc.cc>
2020-09-14 13:14:59 +08:00
Turgay Can 437d4bd81b
Add hazelcast cache store, revised the cache implementation (#1047)
* Add hazelcast cache store, revised the cache implementation

* Remove unsued import

Co-authored-by: Turgay Can <turgay.can@inomera.com>
2020-08-29 14:28:55 +08:00
John Niang 60ad4dad80
Fix an error about version comparision in development environment (#1039)
* Let unknown version as maximum version

* Fix VersionUtilTest error

* Remove deprecated version comparision method and related test
2020-08-23 17:47:52 +08:00
John Niang 3bfb60d5fb
Enable beta version comparable (#1011)
* Ensure whitespace after comma

* Provide version resolver

* Make version comparable

* Refactor version util with version resolver
2020-08-03 02:07:03 +08:00
John Niang 60b2527003
Reformat all codes with newly checkstyle(more strict indentation check) (#1009)
* Reformat all codes with newly checkstyle

* Fix invalid indentation of code comment

* Fix indentation error of test source codes
2020-08-02 09:41:36 +08:00
zhixiangyuan 91a54a4bb3
fix: #975 (#977)
* chore: build.gradle add mavenLocal()(#975)

* feat: markdown import compatible with hugo(#975)
2020-07-19 23:09:38 +08:00
John Niang 7a71c85862
Add iterable objects validation (#970) 2020-07-14 00:15:16 +08:00
sheiy d4b23afb55
pref: 如果系统设置了http代理则创建httpClient时设置代理 (#956)
* 修改缓存时长

* 如果系统设置了http代理则创建httpClient时设置代理

* 如果系统设置了http代理则创建httpClient时设置代理

* 如果系统设置了http代理则创建httpClient时设置代理

* 如果系统设置了http代理则创建httpClient时设置代理

* 如果系统设置了http代理则创建httpClient时设置代理
添加注释

* 添加单元测试
没有useJUnitPlatform()单元测试跑不起来

* 修改单元测试,删除zxing的依赖

* 修正错误的http配置格式

Co-authored-by: Sheiy <35429674@qq.com>
2020-07-10 12:04:43 +08:00
John Niang 11f48781cb
Upgrade spring boot dependency and change some mockito tests (#943)
* Upgrade spring boot dependency and change some mockito tests

* Refactor all test with junit5

Co-authored-by: Ryan Wang <i@ryanc.cc>
2020-07-05 13:36:57 +08:00
BigBang019 2b99bd599f
Fix issue #515 & #592 (#835)
* add release access and branch access(#515)

* add release and branch access(#515)

* always update to latest release(#515)

* #515

* #515

* add testcases(#515)

* fix 515

* fix 515

* deal with connection refused

* disable disk operation related test

* fix #592

* fix #515 & #592

* mockito test

* ignored network related test

* resolve conflict
2020-07-02 23:34:47 +08:00
John Niang 658f0a2b3f
fix: Fix startup exception and theme imports in dev environment (#916)
* Log error instead of throwing while starting halo

* Provide unknown version support

* Fix code format
2020-06-15 21:45:01 +08:00
giveup bc30ab7c03
改进脱敏 (#874)
* fixed typos

* 改进脱敏

* 改进脱敏

* 添加脱敏单元测试

Co-authored-by: Your Name <you@example.com>
2020-05-27 23:29:00 +08:00
Ryan Wang ecc97c207f
chore: remove useless code and dependencies. (#845)
* chore: remove useless code and dependencies.

* Update build.gradle
2020-05-15 11:40:02 +08:00
Yqhg8Nt4tuu 4197ca33d8
feat: Support Rename and Edit Staitc Files (#573) (#819)
* Add rename API

* Add save API

* Add unit test for rename API

* Fix an indentation

* Add a space before '{'

* Add a Param and some invalid checks

* Change comments

* Change test annotation

* Delete impl test unit

* Add directory traversal check for static file operations

Co-authored-by: Rokita <35868425+Ruukita@users.noreply.github.com>
2020-05-11 22:25:08 +08:00
bear 3a45b7a5ed
Support MFA-TOTP Auth (#745)
* add tfa utils

* MFA check api completed

* adminController add loginPreCheck api

* halo-admin test

* checkstyle

* add unit test

* reset MFA
2020-04-04 19:41:22 +08:00
Lei XinXin b4ebf7218e
新增DateTimeUtils (#731)
* 新增DateTimeUtils

* 提交测试用例
2020-03-28 15:08:24 +08:00
iwangbingzhi abaaadafe8
update some chinese descriptions (#711)
Co-authored-by: wangbingzhi <853244870@qq.com>
2020-03-25 09:01:07 +08:00
Ryan Wang a70780c5df
style: code. (#692) 2020-03-18 21:44:46 +08:00
John Niang e8db12a93d
Enable code style check available (#590)
* Add check style plugin and remove halo code style

* Reformat codes for whole project

* Resolve conflicts due to provided checkstyle.xml
2020-02-25 00:24:51 +08:00
Ryan Wang 8f36a5d124
fix: #549 (#587)
* fix: #549

* style: change normalizeImageUrl to normalizeUrl.
2020-02-23 23:34:20 +08:00
guqing b78e2161e5
feat: add basic functions of demo mode (#569)
* feat: add basic functions of demo mode

* feat: add @disableApi annotation to some API that should be disabled

* feat: add DisableApi test case

* fix: change DisableApi annotation name to DisableOnConditation

* Fix test cases

* Add more strict test on failing case

Co-authored-by: John Niang <johnniang@foxmail.com>
2020-02-14 22:08:38 +08:00
johnniang 118aaf8ddc Create one-time token mechanism 2020-02-12 21:10:00 +08:00
John Niang 84b6c2aa14
Fix admin index page redirect (#566)
* Add custom RequestMappingHandlerMapping for enable static resources access

* Fix admin index page redirect
2020-02-11 21:29:01 +08:00
Ryan Wang 08c579a095
feat: support theme require halo version. (#544)
* feat: support theme require halo version.

* fix: com.sun.xml.internal.ws.util does not exist error.

* fix: com.sun.xml.internal.ws.util does not exist error again.

* Update ThemeServiceImpl.java
2020-02-04 16:35:02 +08:00
John Niang bc129977d9
Fix test error (#528) 2020-01-31 11:05:15 +08:00
guqing 61f0748a6a refactor: WordPress data import (#506)
* refactor: WordPress data import

* refactor: change wordpress convert class to interface and add wordpress convert null judgment

* fix: add some class doc

* fix: exclude commons io

* feat: add custom annotation: @PropertyMappingTo and reflection utils, It can be used to mapping the relationship between source model and target model

* feat: replace the original wordpressconvert implementation with a custom annotation

* fix: change wordpress convert method name

* fix: change wordpress convert method name

* fix: merger conflict
2020-01-20 15:23:48 +08:00
johnniang dc166d0b4a none: add some test case, but ignored 2020-01-15 23:04:12 +08:00
pencilso d867f4cca3 feat: add leveldb cache store impl (#494)
add leveldb config by yaml dev
add cache impl test
2020-01-12 19:41:09 +08:00
ruibaby 79e66cd3c0 style: add some comment. 2020-01-01 21:24:28 +08:00
johnniang d59877a9ce Fix directory traversal vulnerability 2019-12-13 00:17:11 +08:00
johnniang bd2eebf1cd Add base post services 2019-12-11 23:10:01 +08:00
johnniang 2153998a32 Secure backup file downloading 2019-11-30 01:29:01 +08:00
ruibaby 61a98b8f7b style: change some class name. 2019-11-25 23:13:42 +08:00
ruibaby cd2c3a17b3 feat: unified formatted slug. 2019-11-18 12:55:32 +08:00
johnniang c7d88b1d1f Accomplish backup listing and deletion 2019-11-18 02:37:36 +08:00
johnniang a041409ff7 Accomplish zip utility 2019-11-17 23:00:50 +08:00
johnniang 74349a11e2 Add Transactional support 2019-07-02 16:20:19 +08:00
johnniang 000d1ff1f2 Complete halo admin updation feature 2019-06-13 00:07:10 +08:00