Skip to content

Commit 0dbaaa5

Browse files
committed
3.0.3
1.修复了share接口报错的问题 2.修复了团队管理里面提示没有权限的bug
1 parent 6c4171a commit 0dbaaa5

File tree

5 files changed

+24
-6
lines changed

5 files changed

+24
-6
lines changed

Client/dist/vendor.bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.

Client/web/util/helper.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,10 +1297,10 @@ helper.handleMockInfo=function (type,param,query,header,body,state) {
12971297
if(state && (state.interfaceEdit || state.interface))
12981298
{
12991299
info.global={
1300-
name:type==0?state.interfaceEdit.name:state.interface.name,
1300+
name:type==0?(state.interfaceEdit?state.interfaceEdit.name:state.interface.name):state.interface.name,
13011301
baseurl:type==0?"":state.baseurl,
1302-
path:type==0?state.interfaceEdit.url:state.interface.url,
1303-
method:type==0?state.interfaceEdit.method:state.interface.method
1302+
path:type==0?(state.interfaceEdit?state.interfaceEdit.url:state.interface.url):state.interface.url,
1303+
method:type==0?(state.interfaceEdit?state.interfaceEdit.method:state.interface.method):state.interface.method
13041304
}
13051305
}
13061306
else

Server/routes/project/project.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,9 @@ function validateUser(req,res) {
178178
users:{
179179
$elemMatch:{
180180
user:req.userInfo._id,
181-
role:0
181+
role:{
182+
$in:[0,2]
183+
}
182184
}
183185
}
184186
}))
@@ -187,6 +189,22 @@ function validateUser(req,res) {
187189
util.throw(e.userForbidden,"你没有权限");
188190
return;
189191
}
192+
req.obj=obj;
193+
if(obj.baseUrls.length>0 && typeof(obj.baseUrls[0])=="string")
194+
{
195+
obj.baseUrls=obj.baseUrls.map(function (obj) {
196+
return {
197+
url:obj,
198+
remark:""
199+
}
200+
})
201+
await (project.updateAsync({
202+
_id:obj._id
203+
},{
204+
baseUrls:obj.baseUrls
205+
}));
206+
}
207+
util.next();
190208
}
191209
else
192210
{

config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
"imgPath":"/Users/Shared/SBDoc/img",
55
"tempPath":"/Users/Shared/SBDoc/temp",
66
"port":10000,
7-
"version":"3.0.2"
7+
"version":"3.0.3"
88
}

0 commit comments

Comments
 (0)