[精讚] [會員登入]
483

縣市端IdP新增自訂首頁內容功能

合併本部主程式,手動於mongo內新增管理使用者資料

分享此文連結 //n.sfs.tw/12353

分享連結 縣市端IdP新增自訂首頁內容功能@外行中的外行
(文章歡迎轉載,務必尊重版權註明連結來源)
2022-11-30 00:12:36 最後編修
2018-04-23 20:48:06 By jung
 

這次IdP程式更新重點在於新增可讓縣市端管理帳號自行修改首頁、常見問題、聯絡方式等頁面的功能

wicket framework的線上編輯器功能,讓修改網頁內容可由縣市端管理者自行維護,而不必每次都要更新程式再重新發布

哲神真的太強了~甲骨文應該認真考慮年薪千萬請他當資深工程師Orz

縣市端程式更新步驟如下

1.從GIT repo拉回哲神已完成的新增功能與本地端的repo合併,找了merge或是rebase的文件來看,還是用merge

完成後,發現主程式多了admin這個package

這就是讓縣市端管理者自行編修前端網頁內容的程式

2.首先到test package的TestHomePage程式將test method註解掉,因為開發時本地端並沒有mongo執行,會導致編譯失敗

將@Test以下的程式都註解掉

3.到縣市端IdP程式的sysconfigs.properties檔案,新增要寫入mongo的collections資料表

mongo.remote=127.0.0.1 //或是localhost
mongo.db=hcstore
mongo.collection.tokenstore=cnctokenstore
mongo.collection.serviceproviderstore=cncspstore
mongo.collection.jwksetstore=jwksetstore
mongo.collection.trustapstore=trustapstore
mongo.collection.frontendpagetype=frontendpagetype
mongo.collection.systemstore=systemstore
mongo.collection.cncuserstore=cncuserstore
mongo.collection.activitystore=activitystore
mongo.collection.authcodestore=authcodestore
mongo.connectionsPerHost=1024

4.更新POM的dependency

有二項更新:

完成後,先編譯本地端auth程式,再檢查cncauthserver程式的POM是否包含更新後的dependency

再編譯過各縣市IdP,到這邊完成90%

 

5.登入縣市IdP主機,進入mongo DB手動寫入資料

mongo
show databases
use xxstore
db.createCollection("systemstore")
//把寫在auth程式的sysconfigs.properties檔案中的collection手動新增到資料庫中
db.systemstore.insert({"systemadmin":["縣市管理帳號"],"manager":["縣市管理帳號"]})
//這段是手動將縣市管理者帳號寫入資料庫,之後可讓管理帳號登入編修前端頁面ㄓ

之後要新增管理帳號,必須要用update and push

多人新增

db.systemstore.update({"_id" : ObjectId("61f5ff43bf5ad46220235d36")},{$push:"systemadmin":["xxxx"],"manager":["xxx"]})

單人新增

db.systemstore.update({"_id" : ObjectId("5ae176e860018eec8511f")},{$push:{"manager":"mb7741"}})

6.最後將編譯過的縣市端IdP authserver程式war檔上傳發布沒有錯誤就完成了!

之後各縣市管理者帳號在教育雲或子網使用縣市帳號登入後,會同步登入IDP,開新分頁到:xx.sso.edu.tw/admin/custompageeditor

就會看到編輯器畫面了

 

END

你可能感興趣的文章

更新程式環境到wildfly18+openjdk11-phase1: upgrade mongodb server 更新程式環境到wildfly18+openjdk11-phase1: upgrade mongodb server to version 3.6

縣市端IdP新增自訂首頁內容功能 合併本部主程式,手動於mongo內新增管理使用者資料

solution for selinux issue while installing zabbix agent on centos7 install zabbix agent as service will raise selinux issue on some centos 7.3.1611

更新程式環境到wildfly18+openjdk11-phase3: 伺服器環境升級準備 upgrade jdk and wildfly on server

系統不正常關機導致mongodb啟動失敗 重新安裝mongodb使用mongorestore

回應 修正pom.xml,

我有話要說

>>

限制:留言最高字數1000字。 限制:未登入訪客,每則留言間隔需超過10分鐘,每日最多5則留言。

訪客留言

[無留言]

隨機好文

安裝netbeans9遇到的小狀況 how to show netbeans9 program onto ubuntu desktop

IIS10設定url rewrite to https if you setup url rewrite function in IIS10, might cause api callback failed

如何用git log功能產生有固定格式的commit紀錄 how to create a git commit history log file with custom format

在IDEA從JDK8升級到JDK11遇到的奇怪問題 在IDEA遇到的JAVA11函式庫引入問題

縣市端新增師生關係API程式 在縣市端建立可由教育部主機撈取縣市資料庫師生關係的API 程式