mirror of
https://github.com/YMFE/yapi.git
synced 2025-01-18 13:04:46 +08:00
fix: 成为了私有项目成员,看不到项目的Bug
This commit is contained in:
parent
8c928a1e19
commit
2762c8fcad
@ -344,7 +344,7 @@ class projectController extends baseController {
|
||||
for(let index=0, item, r = 1; index< result.length; index++){
|
||||
item = result[index].toObject();
|
||||
if(item.project_type === 'private' && auth === false){
|
||||
r = await this.Model.checkMemberRepeat(this.getUid());
|
||||
r = await this.Model.checkMemberRepeat(item._id, this.getUid());
|
||||
if(r === 0){
|
||||
continue;
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ var interfaceColController = function (_baseController) {
|
||||
(0, _createClass3.default)(interfaceColController, [{
|
||||
key: 'list',
|
||||
value: function () {
|
||||
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) {
|
||||
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) {
|
||||
var id, result, i;
|
||||
return _regenerator2.default.wrap(function _callee$(_context) {
|
||||
while (1) {
|
||||
@ -159,7 +159,7 @@ var interfaceColController = function (_baseController) {
|
||||
}, {
|
||||
key: 'addCol',
|
||||
value: function () {
|
||||
var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(ctx) {
|
||||
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(ctx) {
|
||||
var params, auth, result, username;
|
||||
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
||||
while (1) {
|
||||
@ -265,7 +265,7 @@ var interfaceColController = function (_baseController) {
|
||||
}, {
|
||||
key: 'getCaseList',
|
||||
value: function () {
|
||||
var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(ctx) {
|
||||
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(ctx) {
|
||||
var id, inst, result, index, interfaceData, projectData;
|
||||
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
||||
while (1) {
|
||||
@ -357,7 +357,7 @@ var interfaceColController = function (_baseController) {
|
||||
}, {
|
||||
key: 'addCase',
|
||||
value: function () {
|
||||
var _ref4 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee4(ctx) {
|
||||
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(ctx) {
|
||||
var _this2 = this;
|
||||
|
||||
var params, auth, result, username;
|
||||
@ -494,7 +494,7 @@ var interfaceColController = function (_baseController) {
|
||||
}, {
|
||||
key: 'upCase',
|
||||
value: function () {
|
||||
var _ref5 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee5(ctx) {
|
||||
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(ctx) {
|
||||
var _this3 = this;
|
||||
|
||||
var params, caseData, auth, result, username;
|
||||
@ -609,7 +609,7 @@ var interfaceColController = function (_baseController) {
|
||||
}, {
|
||||
key: 'getCase',
|
||||
value: function () {
|
||||
var _ref6 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee6(ctx) {
|
||||
var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(ctx) {
|
||||
var id, result, data, projectData;
|
||||
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
||||
while (1) {
|
||||
@ -707,7 +707,7 @@ var interfaceColController = function (_baseController) {
|
||||
}, {
|
||||
key: 'upCol',
|
||||
value: function () {
|
||||
var _ref7 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee7(ctx) {
|
||||
var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(ctx) {
|
||||
var params, id, colData, auth, result, username;
|
||||
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
||||
while (1) {
|
||||
@ -792,7 +792,7 @@ var interfaceColController = function (_baseController) {
|
||||
}, {
|
||||
key: 'upCaseIndex',
|
||||
value: function () {
|
||||
var _ref8 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee8(ctx) {
|
||||
var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(ctx) {
|
||||
var _this4 = this;
|
||||
|
||||
var params;
|
||||
@ -861,7 +861,7 @@ var interfaceColController = function (_baseController) {
|
||||
}, {
|
||||
key: 'delCol',
|
||||
value: function () {
|
||||
var _ref9 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee9(ctx) {
|
||||
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(ctx) {
|
||||
var id, colData, auth, result, username;
|
||||
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
||||
while (1) {
|
||||
@ -947,7 +947,7 @@ var interfaceColController = function (_baseController) {
|
||||
}, {
|
||||
key: 'delCase',
|
||||
value: function () {
|
||||
var _ref10 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee10(ctx) {
|
||||
var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(ctx) {
|
||||
var _this5 = this;
|
||||
|
||||
var caseid, caseData, auth, result, username;
|
||||
|
@ -148,7 +148,7 @@ var projectController = function (_baseController) {
|
||||
}, {
|
||||
key: 'add',
|
||||
value: function () {
|
||||
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) {
|
||||
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) {
|
||||
var params, checkRepeat, data, result, colInst, catInst, username;
|
||||
return _regenerator2.default.wrap(function _callee$(_context) {
|
||||
while (1) {
|
||||
@ -320,7 +320,7 @@ var projectController = function (_baseController) {
|
||||
}, {
|
||||
key: 'addMember',
|
||||
value: function () {
|
||||
var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(ctx) {
|
||||
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(ctx) {
|
||||
var params, check, userdata, result, username;
|
||||
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
||||
while (1) {
|
||||
@ -443,7 +443,7 @@ var projectController = function (_baseController) {
|
||||
}, {
|
||||
key: 'delMember',
|
||||
value: function () {
|
||||
var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(ctx) {
|
||||
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(ctx) {
|
||||
var _this2 = this;
|
||||
|
||||
var params, check, result, username;
|
||||
@ -541,7 +541,7 @@ var projectController = function (_baseController) {
|
||||
}, {
|
||||
key: 'getUserdata',
|
||||
value: function () {
|
||||
var _ref4 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee4(uid, role) {
|
||||
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(uid, role) {
|
||||
var userInst, userData;
|
||||
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
||||
while (1) {
|
||||
@ -599,7 +599,7 @@ var projectController = function (_baseController) {
|
||||
}, {
|
||||
key: 'getMemberList',
|
||||
value: function () {
|
||||
var _ref5 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee5(ctx) {
|
||||
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(ctx) {
|
||||
var params, project;
|
||||
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
||||
while (1) {
|
||||
@ -661,7 +661,7 @@ var projectController = function (_baseController) {
|
||||
}, {
|
||||
key: 'get',
|
||||
value: function () {
|
||||
var _ref6 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee6(ctx) {
|
||||
var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(ctx) {
|
||||
var params, result, catInst, cat;
|
||||
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
||||
while (1) {
|
||||
@ -746,7 +746,7 @@ var projectController = function (_baseController) {
|
||||
}, {
|
||||
key: 'list',
|
||||
value: function () {
|
||||
var _ref7 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee7(ctx) {
|
||||
var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(ctx) {
|
||||
var _this3 = this;
|
||||
|
||||
var group_id, project_list, auth, result, follow, _loop, index, item, r, _ret;
|
||||
@ -781,7 +781,7 @@ var projectController = function (_baseController) {
|
||||
|
||||
case 12:
|
||||
follow = _context8.sent;
|
||||
_loop = _regenerator2.default.mark(function _loop(index, _item, _r) {
|
||||
_loop = /*#__PURE__*/_regenerator2.default.mark(function _loop(index, _item, _r) {
|
||||
var f;
|
||||
return _regenerator2.default.wrap(function _loop$(_context7) {
|
||||
while (1) {
|
||||
@ -795,7 +795,7 @@ var projectController = function (_baseController) {
|
||||
}
|
||||
|
||||
_context7.next = 4;
|
||||
return _this3.Model.checkMemberRepeat(_this3.getUid());
|
||||
return _this3.Model.checkMemberRepeat(_item._id, _this3.getUid());
|
||||
|
||||
case 4:
|
||||
_r = _context7.sent;
|
||||
@ -898,7 +898,7 @@ var projectController = function (_baseController) {
|
||||
}, {
|
||||
key: 'del',
|
||||
value: function () {
|
||||
var _ref8 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee8(ctx) {
|
||||
var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(ctx) {
|
||||
var id, interfaceInst, interfaceColInst, interfaceCaseInst, result;
|
||||
return _regenerator2.default.wrap(function _callee8$(_context9) {
|
||||
while (1) {
|
||||
@ -991,7 +991,7 @@ var projectController = function (_baseController) {
|
||||
}, {
|
||||
key: 'changeMemberRole',
|
||||
value: function () {
|
||||
var _ref9 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee9(ctx) {
|
||||
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(ctx) {
|
||||
var _this4 = this;
|
||||
|
||||
var params, projectInst, check, result, username;
|
||||
@ -1107,7 +1107,7 @@ var projectController = function (_baseController) {
|
||||
}, {
|
||||
key: 'upSet',
|
||||
value: function () {
|
||||
var _ref10 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee10(ctx) {
|
||||
var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(ctx) {
|
||||
var _this5 = this;
|
||||
|
||||
var id, data, result;
|
||||
@ -1197,7 +1197,7 @@ var projectController = function (_baseController) {
|
||||
}, {
|
||||
key: 'up',
|
||||
value: function () {
|
||||
var _ref11 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee11(ctx) {
|
||||
var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(ctx) {
|
||||
var id, params, projectData, checkRepeat, data, result, username;
|
||||
return _regenerator2.default.wrap(function _callee11$(_context12) {
|
||||
while (1) {
|
||||
@ -1346,7 +1346,7 @@ var projectController = function (_baseController) {
|
||||
}, {
|
||||
key: 'search',
|
||||
value: function () {
|
||||
var _ref12 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee12(ctx) {
|
||||
var _ref12 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(ctx) {
|
||||
var q, projectList, groupList, projectRules, groupRules, queryList;
|
||||
return _regenerator2.default.wrap(function _callee12$(_context13) {
|
||||
while (1) {
|
||||
@ -1421,7 +1421,7 @@ var projectController = function (_baseController) {
|
||||
}, {
|
||||
key: 'download',
|
||||
value: function () {
|
||||
var _ref13 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee13(ctx) {
|
||||
var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(ctx) {
|
||||
var project_id, interfaceInst, count, arr, fileName, res;
|
||||
return _regenerator2.default.wrap(function _callee13$(_context14) {
|
||||
while (1) {
|
||||
|
Loading…
Reference in New Issue
Block a user