diff --git a/maxkey-core/src/main/java/org/maxkey/entity/apps/Apps.java b/maxkey-core/src/main/java/org/maxkey/entity/apps/Apps.java index 536546f46..972bbb7f9 100644 --- a/maxkey-core/src/main/java/org/maxkey/entity/apps/Apps.java +++ b/maxkey-core/src/main/java/org/maxkey/entity/apps/Apps.java @@ -140,6 +140,9 @@ public class Apps extends JpaBaseEntity implements Serializable { @Column private String adapter; + + @Column + protected int accountMgmt; protected Accounts appUser; @Column @@ -583,6 +586,14 @@ public class Apps extends JpaBaseEntity implements Serializable { this.adapterName = adapterName; } + public int getAccountMgmt() { + return accountMgmt; + } + + public void setAccountMgmt(int accountMgmt) { + this.accountMgmt = accountMgmt; + } + @Override public String toString() { StringBuilder builder = new StringBuilder(); diff --git a/maxkey-persistence/src/main/resources/org/maxkey/persistence/mapper/xml/mysql/AppsMapper.xml b/maxkey-persistence/src/main/resources/org/maxkey/persistence/mapper/xml/mysql/AppsMapper.xml index 93711164d..5a64a5d09 100644 --- a/maxkey-persistence/src/main/resources/org/maxkey/persistence/mapper/xml/mysql/AppsMapper.xml +++ b/maxkey-persistence/src/main/resources/org/maxkey/persistence/mapper/xml/mysql/AppsMapper.xml @@ -4,23 +4,27 @@ - and id = #{id} + and id = #{id} - and name like '%${name}%' + and name like '%${name}%' - and protocol = #{protocol} + and protocol = #{protocol} - and credential = #{credential} + and credential = #{credential} - and category = #{category} + and category = #{category} - and vendor = #{vendor} + and vendor = #{vendor} + + and accountmgmt = #{accountMgmt} + + @@ -67,6 +71,7 @@ principal, credentials, + accountmgmt, visible, @@ -108,6 +113,7 @@ #{principal}, #{credentials}, + #{accountMgmt}, #{visible}, @@ -125,17 +131,17 @@ update mxk_apps set - name = #{name}, + name = #{name}, - icon = #{icon}, + icon = #{icon}, - loginurl = #{loginUrl}, - protocol = #{protocol}, - category = #{category}, - secret = #{secret}, - description = #{description}, - vendor = #{vendor}, - vendorurl = #{vendorUrl}, + loginurl = #{loginUrl}, + protocol = #{protocol}, + category = #{category}, + secret = #{secret}, + description = #{description}, + vendor = #{vendor}, + vendorurl = #{vendorUrl}, credential = #{credential}, sharedusername = #{sharedUsername}, @@ -154,20 +160,21 @@ adaptername = #{adapterName}, adapter = #{adapter}, - principal = #{principal}, - credentials = #{credentials}, + principal = #{principal}, + credentials = #{credentials}, + accountmgmt = #{accountMgmt}, visible = #{visible}, sortindex = #{sortIndex}, - modifiedby = #{modifiedBy}, - modifieddate = #{modifiedDate}, + modifiedby = #{modifiedBy}, + modifieddate = #{modifiedDate}, - status = #{status}, + status = #{status}, logouturl = #{logoutUrl}, logouttype = #{logoutType} where - ID = #{id} + ID = #{id} diff --git a/maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/web/apps/contorller/ApplicationsController.java b/maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/web/apps/contorller/ApplicationsController.java index 17e0484fb..b79132d99 100644 --- a/maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/web/apps/contorller/ApplicationsController.java +++ b/maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/web/apps/contorller/ApplicationsController.java @@ -33,6 +33,7 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.ModelAndView; @@ -48,8 +49,14 @@ public class ApplicationsController extends BaseAppContorller { } @RequestMapping(value={"/select"}) - public ModelAndView select(){ - return new ModelAndView("apps/selectAppsList"); + public ModelAndView select(@RequestParam(name="accountMgmt",required=false) String accountMgmt){ + ModelAndView modelAndView=new ModelAndView("apps/selectAppsList"); + if(accountMgmt != null) { + modelAndView.addObject("accountMgmt", accountMgmt); + }else { + modelAndView.addObject("accountMgmt", 3); + } + return modelAndView; } diff --git a/maxkey-webs/maxkey-web-mgt/src/main/resources/messages/message.properties b/maxkey-webs/maxkey-web-mgt/src/main/resources/messages/message.properties index 603a8e8a4..71585ff8a 100644 --- a/maxkey-webs/maxkey-web-mgt/src/main/resources/messages/message.properties +++ b/maxkey-webs/maxkey-web-mgt/src/main/resources/messages/message.properties @@ -313,6 +313,7 @@ apps.extendAttr.parameter.type=\u7c7b\u578b apps.extendAttr.parameter.value=\u503c apps.principal=\u51ed\u8bc1 apps.credentials=\u79d8\u94a5 +apps.accountMgmt=\u8D26\u53F7\u7BA1\u7406 #adapter apps.adapter.name=\u540D\u79F0 apps.adapter.adapter=\u9002\u914D\u5668 diff --git a/maxkey-webs/maxkey-web-mgt/src/main/resources/messages/message_en.properties b/maxkey-webs/maxkey-web-mgt/src/main/resources/messages/message_en.properties index fec4fe5c2..fb8881d1d 100644 --- a/maxkey-webs/maxkey-web-mgt/src/main/resources/messages/message_en.properties +++ b/maxkey-webs/maxkey-web-mgt/src/main/resources/messages/message_en.properties @@ -316,6 +316,7 @@ apps.extendAttr.parameter.type=type apps.extendAttr.parameter.value=value apps.principal=principal apps.credentials=credentials +apps.accountMgmt=AccountMgmt #adapter apps.adapter.name=name diff --git a/maxkey-webs/maxkey-web-mgt/src/main/resources/messages/message_zh_CN.properties b/maxkey-webs/maxkey-web-mgt/src/main/resources/messages/message_zh_CN.properties index 6f3e6631c..9e8081f45 100644 --- a/maxkey-webs/maxkey-web-mgt/src/main/resources/messages/message_zh_CN.properties +++ b/maxkey-webs/maxkey-web-mgt/src/main/resources/messages/message_zh_CN.properties @@ -315,7 +315,7 @@ apps.extendAttr.parameter.type=\u7c7b\u578b apps.extendAttr.parameter.value=\u503c apps.principal=\u51ed\u8bc1 apps.credentials=\u79d8\u94a5 - +apps.accountMgmt=\u8D26\u53F7\u7BA1\u7406 apps.adapter.name=\u540D\u79F0 apps.adapter.adapter=\u9002\u914D\u5668 apps.adapter.protocol=\u534F\u8BAE 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 4f9362f51..57ef986fe 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 @@ -73,7 +73,7 @@ " - wurl="<@base/>/apps/select" + wurl="<@base/>/apps/select?accountMgmt=1" wwidth="800" wheight="620" target="window"/> diff --git a/maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/apps/appAddCommon.ftl b/maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/apps/appAddCommon.ftl index 34fac0f67..fd3c2d02b 100644 --- a/maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/apps/appAddCommon.ftl +++ b/maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/apps/appAddCommon.ftl @@ -31,8 +31,17 @@ <@locale code="apps.logoutUrl"/>: + + + + + + <@locale code="apps.accountMgmt"/>: - + + <@locale code="common.text.status.enabled"/> + <@locale code="common.text.status.disabled"/> + <@locale code="apps.logoutType"/> diff --git a/maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/apps/appUpdateCommon.ftl b/maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/apps/appUpdateCommon.ftl index 95c2e8b57..b19e49953 100644 --- a/maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/apps/appUpdateCommon.ftl +++ b/maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/apps/appUpdateCommon.ftl @@ -31,8 +31,17 @@ <@locale code="apps.logoutUrl"/>: + + + + + + <@locale code="apps.accountMgmt"/>: - + + selected#if> ><@locale code="common.text.status.enabled"/> + selected#if> ><@locale code="common.text.status.disabled"/> + <@locale code="apps.logoutType"/> diff --git a/maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/apps/selectAppsList.ftl b/maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/apps/selectAppsList.ftl index 00e008413..55aa399c8 100644 --- a/maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/apps/selectAppsList.ftl +++ b/maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/apps/selectAppsList.ftl @@ -31,6 +31,7 @@ +