w-web-perm 1.0.13 → 1.0.14

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.
@@ -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="WWebPerm.mjs.html">WWebPerm.mjs</a>, <a href="WWebPerm.mjs.html#line131">line 131</a>
83
+ <a href="WWebPerm.mjs.html">WWebPerm.mjs</a>, <a href="WWebPerm.mjs.html#line132">line 132</a>
84
84
  </li></ul></dd>
85
85
 
86
86
 
@@ -925,7 +925,7 @@
925
925
  <br class="clear">
926
926
 
927
927
  <footer>
928
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Tue Sep 24 2024 15:29:14 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
928
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Tue Sep 24 2024 15:57:37 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
929
929
  </footer>
930
930
 
931
931
  <script>prettyPrint();</script>
@@ -51,6 +51,7 @@ import get from 'lodash-es/get.js'
51
51
  import map from 'lodash-es/map.js'
52
52
  import keys from 'lodash-es/keys.js'
53
53
  import size from 'lodash-es/size.js'
54
+ import join from 'lodash-es/join.js'
54
55
  import iseobj from 'wsemi/src/iseobj.mjs'
55
56
  import isestr from 'wsemi/src/isestr.mjs'
56
57
  import ispint from 'wsemi/src/ispint.mjs'
@@ -672,7 +673,7 @@ function WWebPerm(WOrm, url, db, getUserByToken, verifyBrowserUser, verifyAppUse
672
673
  }
673
674
 
674
675
 
675
- //getGenUserAndRulesByUserId bbb
676
+ //getGenUserAndRulesByUserId
676
677
  let getGenUserAndRulesByUserId = async (userId) => {
677
678
 
678
679
  //userFind
@@ -702,8 +703,15 @@ function WWebPerm(WOrm, url, db, getUserByToken, verifyBrowserUser, verifyAppUse
702
703
  return Promise.reject(`can not get rules of user`)
703
704
  }
704
705
 
706
+ //grupsNames
707
+ let grupsNames = map(get(kur, 'grups', []), 'name')
708
+ grupsNames = join(grupsNames, ';')
709
+
705
710
  return {
706
- user: userFind,
711
+ user: {
712
+ ...userFind,
713
+ grupsNames,
714
+ },
707
715
  kur,
708
716
  }
709
717
  }
@@ -1151,7 +1159,7 @@ export default WWebPerm
1151
1159
  <br class="clear">
1152
1160
 
1153
1161
  <footer>
1154
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Tue Sep 24 2024 15:29:14 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
1162
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Tue Sep 24 2024 15:57:37 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
1155
1163
  </footer>
1156
1164
 
1157
1165
  <script>prettyPrint();</script>
package/docs/index.html CHANGED
@@ -71,7 +71,7 @@
71
71
  <br class="clear">
72
72
 
73
73
  <footer>
74
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Tue Sep 24 2024 15:29:14 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
74
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Tue Sep 24 2024 15:57:37 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
75
75
  </footer>
76
76
 
77
77
  <script>prettyPrint();</script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "w-web-perm",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "main": "dist/w-web-perm.umd.js",
5
5
  "dependencies": {
6
6
  "@mdi/js": "^7.4.47",
@@ -4,6 +4,7 @@ import get from 'lodash-es/get.js'
4
4
  import map from 'lodash-es/map.js'
5
5
  import keys from 'lodash-es/keys.js'
6
6
  import size from 'lodash-es/size.js'
7
+ import join from 'lodash-es/join.js'
7
8
  import iseobj from 'wsemi/src/iseobj.mjs'
8
9
  import isestr from 'wsemi/src/isestr.mjs'
9
10
  import ispint from 'wsemi/src/ispint.mjs'
@@ -625,7 +626,7 @@ function WWebPerm(WOrm, url, db, getUserByToken, verifyBrowserUser, verifyAppUse
625
626
  }
626
627
 
627
628
 
628
- //getGenUserAndRulesByUserId bbb
629
+ //getGenUserAndRulesByUserId
629
630
  let getGenUserAndRulesByUserId = async (userId) => {
630
631
 
631
632
  //userFind
@@ -655,8 +656,15 @@ function WWebPerm(WOrm, url, db, getUserByToken, verifyBrowserUser, verifyAppUse
655
656
  return Promise.reject(`can not get rules of user`)
656
657
  }
657
658
 
659
+ //grupsNames
660
+ let grupsNames = map(get(kur, 'grups', []), 'name')
661
+ grupsNames = join(grupsNames, ';')
662
+
658
663
  return {
659
- user: userFind,
664
+ user: {
665
+ ...userFind,
666
+ grupsNames,
667
+ },
660
668
  kur,
661
669
  }
662
670
  }
@@ -908,8 +908,8 @@ export default {
908
908
  }
909
909
 
910
910
  // //getUserRules
911
- // let ur = vo.$s.getUserRules(r, vo.grups, vo.pemis, vo.targets)
912
- // console.log('getUserRules ur', ur)
911
+ // let kur = vo.$s.getUserRules(r, vo.grups, vo.pemis, vo.targets)
912
+ // console.log('getUserRules kur', kur)
913
913
 
914
914
  //showVeCgrups
915
915
  vo.$dg.showVeCgrups(r)
@@ -1 +1 @@
1
- {"grups":"2024-09-24T15:23:40+08:00|oSGePv","pemis":"2024-09-24T15:23:33+08:00|fGNRG5","targets":"2024-09-24T15:23:27+08:00|pWajwG","users":"2024-09-24T15:24:58+08:00|pNchw5"}
1
+ {"grups":"Ga48YJ","pemis":"V7bng2","targets":"9AXPhp","users":"KzLrTv"}