owl-cli 5.24.0 → 5.28.0

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.
@@ -2,7 +2,6 @@
2
2
  //#import session.js
3
3
  //#import $@projectCode:services/modelService.jsx
4
4
  //#import @handlers/include/checklogin.jsx
5
- //#import @handlers/include/checklogin.jsx
6
5
  ;(function() {
7
6
  var spec = @spec;
8
7
  var meta = spec['#meta'];
@@ -27,13 +26,11 @@
27
26
  var isPublic = meta && meta.isPublic;
28
27
 
29
28
  var searchArgs = {}
30
- if((parentId && parentId!='0') || env.orgId=='0'){
31
- searchArgs = {
32
- parent_id:parentId
33
- }
34
- if(!isPublic && orgId && orgId!='0'){
35
- searchArgs["_orgIds"] = orgId;
36
- }
29
+ if(!isPublic && orgId && orgId!=='0'){
30
+ searchArgs["_orgIds"] = orgId;
31
+ }
32
+ if(parentId && parentId!=='0'){
33
+ searchArgs['parent_id'] = parentId;
37
34
 
38
35
  var obj = @projectCodeService.search("0",searchArgs,null,0, 10000,null);
39
36
  var total = obj.total;
@@ -47,8 +44,8 @@
47
44
  out.print(JSON.stringify(ret));
48
45
  }
49
46
  else{
50
- var topNode = meta.topNode;
51
- if(topNode){
47
+ var topNode = meta.root;
48
+ if(orgId!=='0' && topNode){
52
49
  var id = topNode;
53
50
  if(topNode.indexOf("$")===0){
54
51
  var idexpr = topNode.substring(1);
@@ -83,6 +83,7 @@ var spec = @spec;
83
83
  var meta = spec['#meta'];
84
84
  var isPublic = meta && meta.isPublic;
85
85
 
86
+
86
87
  if(!isPublic && orgId && orgId!=='0'){
87
88
  filters.push({
88
89
  "term":{
@@ -90,6 +91,19 @@ var spec = @spec;
90
91
  }
91
92
  })
92
93
  }
94
+
95
+ if(meta && meta.isTree && env.orgId!=='0'){
96
+ if(meta.root){
97
+ if(meta.root.startsWith("$")){
98
+ var rootId = eval(meta.root.substring(1));
99
+ filters.push({
100
+ "term":{
101
+ "parentPathIds" : rootId
102
+ }
103
+ })
104
+ }
105
+ }
106
+ }
93
107
  return filters;
94
108
  }
95
109
 
@@ -53,7 +53,9 @@
53
53
  state:"ok",
54
54
  thumbUrl:"" + url,
55
55
  url:"" +fullUrl,
56
- fileId:"" +fileInfo.fileId
56
+ fileId:"" +fileInfo.fileId,
57
+ name: "" +fileInfo.fileName,
58
+ size:fileInfo.size
57
59
 
58
60
  }
59
61
  out.print(JSON.stringify(ret));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "owl-cli",
3
- "version": "5.24.0",
3
+ "version": "5.28.0",
4
4
  "main": "index.js",
5
5
  "preferGlobal": true,
6
6
  "bin": {