diff --git a/.gitignore b/.gitignore index d0fc7003..2da51cbf 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ setEnvVars.bat /.gradle/ /.gradle/* +.vscode/settings.json diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index 9eed10bc..2a314f22 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -21,9 +21,15 @@ *(MAXKEY-210820) 企业微信扫码登录js更新wwLogin-1.2.4.js *(MAXKEY-210821) 中文切换调整为下拉菜单 *(MAXKEY-210822) 移除原有的缓存方案 - *(MAXKEY-210823) 依赖jar引用、更新和升级 - spring 5.3.11 + *(MAXKEY-210823) 应用管理OAuth适配器显示问题修复 + *(MAXKEY-210824) 图片验证码优化,增加随机颜色的字符生成实现,干扰线优化 + *(MAXKEY-210825) 依赖jar引用、更新和升级 + spring 5.3.12 + springboot 2.5.6 tomcat 9.0.54 + springSecurity 5.5.3 + springData 2.5.5 + springSession 2.5.3 mybatis-jpa-extra 2.6 druid 1.2.8 caffeine 2.9.2 diff --git a/gradle.properties b/gradle.properties index d2aaab3f..bcb5b298 100644 --- a/gradle.properties +++ b/gradle.properties @@ -44,11 +44,11 @@ poiVersion =4.1.2 tomcatVersion =9.0.54 tomcatembedloggingjuliVersion =8.5.2 #spring -springVersion =5.3.11 -springBootVersion =2.5.5 -springSecurityVersion =5.5.2 -springDataVersion =2.5.2 -springSessionVersion =2.5.2 +springVersion =5.3.12 +springBootVersion =2.5.6 +springSecurityVersion =5.5.3 +springDataVersion =2.5.5 +springSessionVersion =2.5.3 springkafkaVersion =2.7.7 springretryVersion =1.3.0 springplugincoreVersion =2.0.0.RELEASE @@ -61,6 +61,7 @@ springcloudalibabacsplVersion =1.8.2 alibabanacosclientVersion =2.0.3 #google jibGradlePluginVersion =3.1.4 +jhlabsfiltersVersion =2.0.235-1 kaptchaVersion =2.3.2 gsonVersion =2.8.8 guavaVersion =30.1.1-jre @@ -98,7 +99,6 @@ jakartaannotationVersion =2.0.0 jakartavalidationapiVersion =3.0.0 attoparserVersion =2.0.5.RELEASE unbescapeVersion =1.1.6.RELEASE -jhlabsfiltersVersion =2.0.235-1 slf4jVersion =1.7.32 jacksonVersion =2.12.5 bouncycastleVersion =1.69 diff --git a/maxkey-core/src/main/java/org/maxkey/entity/Accounts.java b/maxkey-core/src/main/java/org/maxkey/entity/Accounts.java index e160bc1a..9844a2ee 100644 --- a/maxkey-core/src/main/java/org/maxkey/entity/Accounts.java +++ b/maxkey-core/src/main/java/org/maxkey/entity/Accounts.java @@ -60,6 +60,12 @@ public class Accounts extends JpaBaseEntity implements Serializable { private String relatedUsername; @Column private String relatedPassword; + @Column + private String createType; + @Column + private String strategyId; + @Column + private int status; UserInfo userInfo; @@ -156,6 +162,31 @@ public class Accounts extends JpaBaseEntity implements Serializable { this.userInfo = userInfo; } + + public String getCreateType() { + return createType; + } + + public void setCreateType(String createType) { + this.createType = createType; + } + + public String getStrategyId() { + return strategyId; + } + + public void setStrategyId(String strategyId) { + this.strategyId = strategyId; + } + + public int getStatus() { + return status; + } + + public void setStatus(int status) { + this.status = status; + } + @Override public String toString() { return "AppAccounts [uid=" + userId + ", username=" + username + ", displayName=" + displayName + ", appId=" diff --git a/maxkey-core/src/main/java/org/maxkey/entity/apps/AppsOAuth20Details.java b/maxkey-core/src/main/java/org/maxkey/entity/apps/AppsOAuth20Details.java index 5c9748eb..ac161f64 100644 --- a/maxkey-core/src/main/java/org/maxkey/entity/apps/AppsOAuth20Details.java +++ b/maxkey-core/src/main/java/org/maxkey/entity/apps/AppsOAuth20Details.java @@ -90,6 +90,9 @@ public class AppsOAuth20Details extends Apps { this.setVendor(application.getVendor()); this.setVendorUrl(application.getVendorUrl()); this.setVisible(application.getVisible()); + this.setAdapter(application.getAdapter()); + this.setAdapterId(application.getAdapterId()); + this.setAdapterName(application.getAdapterName()); this.clientSecret = baseClientDetails.getClientSecret(); this.scope = baseClientDetails.getScope().toString(); @@ -114,6 +117,7 @@ public class AppsOAuth20Details extends Apps { this.approvalPrompt = baseClientDetails.getApprovalPrompt(); this.pkce = baseClientDetails.getPkce(); + } diff --git a/maxkey-persistence/src/main/java/org/maxkey/persistence/service/GroupsService.java b/maxkey-persistence/src/main/java/org/maxkey/persistence/service/GroupsService.java index 572613f0..5aba03d2 100644 --- a/maxkey-persistence/src/main/java/org/maxkey/persistence/service/GroupsService.java +++ b/maxkey-persistence/src/main/java/org/maxkey/persistence/service/GroupsService.java @@ -75,8 +75,8 @@ public class GroupsService extends JpaBaseService implements Serializab if(dynamicGroup.getDynamic().equals("1")) { boolean isDynamicTimeSupport = false; boolean isBetweenEffectiveTime = false; - if(dynamicGroup.getResumeTime()!=null&&dynamicGroup.getResumeTime().equals("") - &&dynamicGroup.getSuspendTime()!=null&&dynamicGroup.getSuspendTime().equals("")) { + if(StringUtils.isNotBlank(dynamicGroup.getResumeTime()) + &&StringUtils.isNotBlank(dynamicGroup.getSuspendTime())) { LocalTime currentTime = LocalDateTime.now().toLocalTime(); LocalTime resumeTime = LocalTime.parse(dynamicGroup.getResumeTime()); LocalTime suspendTime = LocalTime.parse(dynamicGroup.getSuspendTime()); @@ -92,7 +92,7 @@ public class GroupsService extends JpaBaseService implements Serializab } - if(dynamicGroup.getOrgIdsList()!=null && !dynamicGroup.getOrgIdsList().equals("")) { + if(StringUtils.isNotBlank(dynamicGroup.getOrgIdsList())) { dynamicGroup.setOrgIdsList("'"+dynamicGroup.getOrgIdsList().replace(",", "','")+"'"); } String filters = dynamicGroup.getFilters(); diff --git a/maxkey-webs/maxkey-web-mgt/src/main/resources/META-INF/spring.factories b/maxkey-webs/maxkey-web-mgt/src/main/resources/META-INF/spring.factories index de551117..f618e6d4 100644 --- a/maxkey-webs/maxkey-web-mgt/src/main/resources/META-INF/spring.factories +++ b/maxkey-webs/maxkey-web-mgt/src/main/resources/META-INF/spring.factories @@ -7,5 +7,6 @@ org.maxkey.autoconfigure.JwtAuthnAutoConfiguration,\ org.maxkey.autoconfigure.RedisAutoConfiguration,\ org.maxkey.autoconfigure.AuthenticationAutoConfiguration,\ org.maxkey.synchronizer.autoconfigure.SynchronizerAutoConfiguration,\ +org.maxkey.autoconfigure.SwaggerConfig,\ org.maxkey.MaxKeyMgtConfig,\ org.maxkey.MaxKeyMgtMvcConfig diff --git a/maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/accounts/accountsAdd.ftl b/maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/accounts/accountsAdd.ftl index 259dd831..ea14eeb8 100644 --- a/maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/accounts/accountsAdd.ftl +++ b/maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/accounts/accountsAdd.ftl @@ -29,7 +29,7 @@ -
+ diff --git a/maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/accounts/accountsList.ftl b/maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/accounts/accountsList.ftl index 34c5d612..3b3b7463 100644 --- a/maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/accounts/accountsList.ftl +++ b/maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/accounts/accountsList.ftl @@ -3,6 +3,21 @@ <#include "../layout/header.ftl"/> <#include "../layout/common.cssjs.ftl"/> +
@@ -57,8 +72,12 @@ wurl="<@base/>/accounts/forwardAdd" wwidth="960" wheight="600" - target="window"> - + target="window"> + " + wurl="<@base/>/accounts/forwardUpdate" + wwidth="700" + wheight="400" + target="window"> " wurl="<@base/>/accounts/delete" />
@@ -115,6 +134,7 @@ +
<@locale code="account.appName"/> <@locale code="account.appId"/> <@locale code="account.relatedUsername"/><@locale code="common.text.status"/>
diff --git a/maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/accounts/accountsUpdate.ftl b/maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/accounts/accountsUpdate.ftl new file mode 100644 index 00000000..3ac08d4e --- /dev/null +++ b/maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/accounts/accountsUpdate.ftl @@ -0,0 +1,121 @@ + + + + <#include "../layout/header.ftl"/> + <#include "../layout/common.cssjs.ftl"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
<@locale code="userinfo.id" />: + + + +
<@locale code="userinfo.username" />: + + + + +
<@locale code="userinfo.displayName" />: + + + +
<@locale code="apps.name" />: + + + + + +
<@locale code="account.relatedUsername" />: + + + +
<@locale code="account.relatedPassword" />: + + + "/> + "/> + +
<@locale code="common.text.status" />: + +
+ + + + "/> + "/> + +
+
+ + \ No newline at end of file diff --git a/maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/socialsprovider/socialsProviderAdd.ftl b/maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/socialsprovider/socialsProviderAdd.ftl index 1b7a9bd1..570ee8c5 100644 --- a/maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/socialsprovider/socialsProviderAdd.ftl +++ b/maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/socialsprovider/socialsProviderAdd.ftl @@ -69,13 +69,19 @@ <@locale code="socials.provider.hidden" />: - + <@locale code="common.text.status" />: - + diff --git a/maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/socialsprovider/socialsProviderList.ftl b/maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/socialsprovider/socialsProviderList.ftl index c450187c..b1132be3 100644 --- a/maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/socialsprovider/socialsProviderList.ftl +++ b/maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/socialsprovider/socialsProviderList.ftl @@ -4,9 +4,20 @@ <#include "../layout/header.ftl"/> <#include "../layout/common.cssjs.ftl"/>