w-web-perm 1.1.4 → 1.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +1 -1
  2. package/dist/css/app.6918ec45.css +1 -0
  3. package/dist/css/{chunk-vendors.2bcfce08.css → chunk-vendors.3c580e72.css} +1 -1
  4. package/dist/index.tmp +2 -2
  5. package/dist/js/app-legacy.5f15a58f.js +1 -0
  6. package/dist/js/app.5f15a58f.js +1 -0
  7. package/dist/js/{chunk-vendors-legacy.fc37f076.js → chunk-vendors-legacy.38f515f9.js} +16 -16
  8. package/dist/js/{chunk-vendors.fc37f076.js → chunk-vendors.38f515f9.js} +16 -16
  9. package/dist/w-web-perm.umd.js +2 -2
  10. package/dist/w-web-perm.umd.js.map +1 -1
  11. package/docs/WWebPerm.html +7 -7
  12. package/docs/global.html +2068 -111
  13. package/docs/index.html +2 -2
  14. package/docs/server_WWebPerm.mjs.html +63 -31
  15. package/docs/server_lockSave.mjs.html +115 -0
  16. package/docs/server_maskLog.mjs.html +176 -0
  17. package/docs/server_procCore.mjs.html +31 -5
  18. package/docs/server_wrapInjected.mjs.html +163 -0
  19. package/docs/src_fetchJson.mjs.html +31 -5
  20. package/docs/src_js_legendFit.mjs.html +225 -0
  21. package/docs/src_plugins_reuseDeletedIds.mjs.html +136 -0
  22. package/docs/src_plugins_submitGuard.mjs.html +163 -0
  23. package/package.json +13 -13
  24. package/public/index.html +2 -0
  25. package/server/WWebPerm.mjs +61 -29
  26. package/server/lockSave.mjs +43 -0
  27. package/server/maskLog.mjs +104 -0
  28. package/server/procCore.mjs +29 -3
  29. package/server/procLang.mjs +8 -0
  30. package/server/procStaInfor.mjs +32 -14
  31. package/server/wrapInjected.mjs +91 -0
  32. package/src/components/Common/CheckYes.vue +6 -0
  33. package/src/components/Common/CheckYesNo.vue +6 -0
  34. package/src/components/LayoutContentGrups.vue +30 -21
  35. package/src/components/LayoutContentPemis.vue +30 -21
  36. package/src/components/LayoutContentStaInfor.vue +74 -5
  37. package/src/components/LayoutContentTargets.vue +36 -22
  38. package/src/components/LayoutContentUsers.vue +31 -21
  39. package/src/components/RelationChips.vue +11 -31
  40. package/src/components/VeCgrups.vue +8 -1
  41. package/src/components/VeCpemis.vue +8 -1
  42. package/src/components/VeCrules.vue +8 -1
  43. package/src/components/VeGrupBlngUsers.vue +37 -31
  44. package/src/components/VePemiBlngGrups.vue +37 -31
  45. package/src/fetchJson.mjs +28 -2
  46. package/src/getPerm.mjs +9 -6
  47. package/src/getPermUserInfor.mjs +12 -9
  48. package/src/js/legendFit.mjs +153 -0
  49. package/src/plugins/mUI.mjs +20 -0
  50. package/src/plugins/reuseDeletedIds.mjs +64 -0
  51. package/src/plugins/submitGuard.mjs +91 -0
  52. package/srv.mjs +20 -1
  53. package/dist/css/app.506ce4d8.css +0 -1
  54. package/dist/js/app-legacy.8e615442.js +0 -1
  55. package/dist/js/app.8e615442.js +0 -1
  56. package/tableTags-web-perm.json +0 -1
@@ -29,7 +29,7 @@
29
29
  <nav >
30
30
 
31
31
 
32
- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="WWebPerm.html">WWebPerm</a></li></ul><h3>Global</h3><ul><li><a href="global.html#fetchJson">fetchJson</a></li><li><a href="global.html#mergePickKeysOnly">mergePickKeysOnly</a></li></ul>
32
+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="WWebPerm.html">WWebPerm</a></li></ul><h3>Global</h3><ul><li><a href="global.html#createLegendMeasurer">createLegendMeasurer</a></li><li><a href="global.html#createLockSave">createLockSave</a></li><li><a href="global.html#decideLegendType">decideLegendType</a></li><li><a href="global.html#describeUpstream">describeUpstream</a></li><li><a href="global.html#fetchJson">fetchJson</a></li><li><a href="global.html#genLegend">genLegend</a></li><li><a href="global.html#maskQuery">maskQuery</a></li><li><a href="global.html#maskTok">maskTok</a></li><li><a href="global.html#maskUrl">maskUrl</a></li><li><a href="global.html#mergePickKeysOnly">mergePickKeysOnly</a></li><li><a href="global.html#reuseDeletedIds">reuseDeletedIds</a></li><li><a href="global.html#submitGuard">submitGuard</a></li><li><a href="global.html#wrapInjected">wrapInjected</a></li></ul>
33
33
 
34
34
  </nav>
35
35
 
@@ -80,7 +80,7 @@
80
80
 
81
81
  <dt class="tag-source">Source:</dt>
82
82
  <dd class="tag-source"><ul class="dummy"><li>
83
- <a href="server_WWebPerm.mjs.html">server/WWebPerm.mjs</a>, <a href="server_WWebPerm.mjs.html#line140">line 140</a>
83
+ <a href="server_WWebPerm.mjs.html">server/WWebPerm.mjs</a>, <a href="server_WWebPerm.mjs.html#line144">line 144</a>
84
84
  </li></ul></dd>
85
85
 
86
86
 
@@ -127,7 +127,7 @@
127
127
 
128
128
  <h5 class="h5-examples">Example</h5>
129
129
 
130
- <pre class="prettyprint"><code>import WOrm from 'w-orm-lmdb/src/WOrmLmdb.mjs'
131
130
  useCheckUser: false,
132
131
  getUserById: null,
133
132
  useExcludeWhenNotAdmin: false,
134
133
  serverPort: 11006,
135
134
  subfolder: '', //mperm
136
135
  urlRedirect: 'https://www.google.com/', //本機測試時得先編譯, 再瀏覽: http://localhost:11006/
137
136
  webName: {
138
137
  'eng': 'Permission Service',
139
138
  'cht': '權限管理系統',
140
139
  },
141
140
  webDescription: {
142
141
  'eng': 'A web service package for user permissions and management targets.',
143
142
  'cht': 'A web service package for user permissions and management targets.',
144
143
  },
145
144
  webLogo: 'data:image/svg+xml;base64,...',
146
145
  // return {} //測試無法登入
147
146
  if (token === '{token-for-application}') { //提供外部應用系統作為存取使用者
148
147
  return {
149
148
  id: 'id-for-application',
150
149
  name: 'application',
151
150
  email: 'application@example.com',
152
151
  isAdmin: 'y',
153
152
  }
154
153
  }
155
154
  if (token === 'sys') { //開發階段w-ui-loginout自動給予browser使用者(且位於localhost)的token為sys
156
155
  return {
157
156
  id: 'id-for-admin',
158
157
  name: 'tester',
159
158
  email: 'admin@example.com', //mappingBy為email, 開發階段時會使用email找到所建置之使用者資料
160
159
  isAdmin: 'y',
161
160
  }
162
161
  }
163
162
  console.log('invalid token', token)
164
163
  console.log('於生產環境時得加入SSO等驗證token機制')
165
164
  return {}
166
165
  console.log('verifyClientUser/user', user)
167
166
  // return false //測試無法登入
168
167
  console.log('於生產環境時得加入限制瀏覽器使用者身份機制')
169
168
  return user.isAdmin === 'y' //測試僅系統管理者使用
170
169
  console.log('verifyAppUser/user', user)
171
170
  // return false //測試無法登入
172
171
  console.log('於生產環境時得加入限制應用程式使用者身份機制')
173
172
  return user.isAdmin === 'y' //測試僅系統管理者使用
174
173
  console.log(err)
174
+ <pre class="prettyprint"><code>import WOrm from 'w-orm-lmdb/src/WOrmLmdb.mjs'
175
175
  useCheckUser: false,
176
176
  getUserById: null,
177
177
  useExcludeWhenNotAdmin: false,
178
178
  serverPort: 11006,
179
179
  subfolder: '', //mperm
180
180
  urlRedirect: 'https://www.google.com/', //本機測試時得先編譯, 再瀏覽: http://localhost:11006/
181
181
  webName: {
182
182
  'eng': 'Permission Service',
183
183
  'cht': '權限管理系統',
184
184
  },
185
185
  webDescription: {
186
186
  'eng': 'A web service package for user permissions and management targets.',
187
187
  'cht': 'A web service package for user permissions and management targets.',
188
188
  },
189
189
  webLogo: 'data:image/svg+xml;base64,...',
190
190
  // return {} //測試無法登入
191
191
  if (token === '{token-for-application}') { //提供外部應用系統作為存取使用者
192
192
  return {
193
193
  id: 'id-for-application',
194
194
  name: 'application',
195
195
  email: 'application@example.com',
196
196
  isAdmin: 'y',
197
197
  }
198
198
  }
199
199
  if (token === 'sys') { //開發階段w-ui-loginout自動給予browser使用者(且位於localhost)的token為sys
200
200
  return {
201
201
  id: 'id-for-admin',
202
202
  name: 'tester',
203
203
  email: 'admin@example.com', //mappingBy為email, 開發階段時會使用email找到所建置之使用者資料
204
204
  isAdmin: 'y',
205
205
  }
206
206
  }
207
207
  console.log('invalid token') //勿印權杖值
208
208
  console.log('於生產環境時得加入SSO等驗證token機制')
209
209
  return {}
210
210
  console.log('verifyClientUser/user', user)
211
211
  // return false //測試無法登入
212
212
  console.log('於生產環境時得加入限制瀏覽器使用者身份機制')
213
213
  return user.isAdmin === 'y' //測試僅系統管理者使用
214
214
  console.log('verifyAppUser/user', user)
215
215
  // return false //測試無法登入
216
216
  console.log('於生產環境時得加入限制應用程式使用者身份機制')
217
217
  return user.isAdmin === 'y' //測試僅系統管理者使用
218
218
  console.log(err)
219
219
 
220
220
 
221
221
 
@@ -298,7 +298,7 @@
298
298
  </td>
299
299
 
300
300
 
301
- <td class="description last"><p>輸入處理函數,函數會傳入使用者token,通過此函數處理後並回傳使用者資訊物件,並至少須提供'id'、'email'、'name'、'isAdmin'欄位,且'isAdmin'限輸入'y'或'n'。注意: token 回傳之'isAdmin'僅供識別,權限系統一律以自身users表該使用者之'isAdmin'欄位值為權威,不會被 token 宣稱之值複寫</p></td>
301
+ <td class="description last"><p>輸入處理函數,函數會傳入使用者token,通過此函數處理後並回傳使用者資訊物件,並至少須提供'id'、'email'、'name'、'isAdmin'欄位,且'isAdmin'限輸入'y'或'n'。注意: token 回傳之'isAdmin'僅供識別,權限系統一律以自身users表該使用者之'isAdmin'欄位值為權威,不會被 token 宣稱之值複寫。函數拋錯或reject時視同查無使用者(回自家錯誤key,錯誤原文不回前端、不入log,只於srLog記warn)</p></td>
302
302
  </tr>
303
303
 
304
304
 
@@ -334,7 +334,7 @@
334
334
  </td>
335
335
 
336
336
 
337
- <td class="description last"><p>輸入驗證瀏覽使用者身份之處理函數,函數會傳入使用者資訊物件(perm users 表之列)與來源字串from,通過此函數識別後回傳布林值(可為Promise),允許使用者回傳true,反之回傳false。from 值域: 'getUserByToken'(登入)、'getPerm'(api/getPerm)、以及資料通道之 apiType 'main'(RPC 與 ORM 執行)、'upload-controller'、'upload-slice'、'download-get-filename'、'download-get-file'、'download';資料通道與登入採同一授權強度(反查 perm users 且 isActive='y' 後再經本函數)</p></td>
337
+ <td class="description last"><p>輸入驗證瀏覽使用者身份之處理函數,函數會傳入使用者資訊物件(perm users 表之列)與來源字串from,通過此函數識別後回傳布林值(可為Promise),允許使用者回傳true,反之回傳false。from 值域: 'getUserByToken'(登入)、'getPerm'(api/getPerm)、以及資料通道之 apiType 'main'(RPC 與 ORM 執行)、'upload-controller'、'upload-slice'、'download-get-filename'、'download-get-file'、'download';資料通道與登入採同一授權強度(反查 perm users 且 isActive='y' 後再經本函數);函數拋錯或reject時視同回傳false</p></td>
338
338
  </tr>
339
339
 
340
340
 
@@ -370,7 +370,7 @@
370
370
  </td>
371
371
 
372
372
 
373
- <td class="description last"><p>輸入驗證應用程序使用者身份之處理函數,函數會傳入使用者資訊物件,通過此函數識別後回傳布林值,允許使用者回傳true,反之回傳false</p></td>
373
+ <td class="description last"><p>輸入驗證應用程序使用者身份之處理函數,函數會傳入使用者資訊物件,通過此函數識別後回傳布林值,允許使用者回傳true,反之回傳false;函數拋錯或reject時視同回傳false</p></td>
374
374
  </tr>
375
375
 
376
376
 
@@ -1045,7 +1045,7 @@
1045
1045
  <br class="clear">
1046
1046
 
1047
1047
  <footer>
1048
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Thu Sep 24 2026 13:05:11 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
1048
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Fri Oct 02 2026 20:53:56 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
1049
1049
  </footer>
1050
1050
 
1051
1051
  <script>prettyPrint();</script>