增加test用户不允许删除分类
This commit is contained in:
parent
eb005395ec
commit
01a190a444
|
|
@ -344,7 +344,7 @@ app.controller('tagsCtr', ['$scope', '$filter', '$window', '$stateParams', '$tim
|
|||
getTags({});
|
||||
}
|
||||
} else {
|
||||
toastr.error('[ ' + tagName + ' ]分类删除失败!', "提示");
|
||||
toastr.error('[ ' + tagName + ' ]分类删除失败!' + data.msg, "提示");
|
||||
getTags({});
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -995,6 +995,13 @@ api.post('/updateTagsIndex', function(req, res) {
|
|||
|
||||
api.post('/delTag', function(req, res) {
|
||||
console.log("delTag username = ", req.session.username);
|
||||
if(req.session.username === "test") {
|
||||
res.json({
|
||||
retCode: 100,
|
||||
msg: "test用户不允许删除分类!",
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (!req.session.user) {
|
||||
res.send(401);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in New Issue