- L'utente entra direttamente sul circuito, con fido a zero.
++Abilitazione Fido utente (per admin).
This commit is contained in:
@@ -364,7 +364,7 @@ router.post('/settable', authenticate, async (req, res) => {
|
||||
} else if (params.table === 'hours') {
|
||||
|
||||
} else {
|
||||
if ((mydata['_id'] === undefined || mydata['_id'] === '' || (mytablerec.isNew && mydata['_id'] === 0)) && (mytablerec._id === undefined)) {
|
||||
if ((mydata['_id'] === undefined || mydata['_id'] === '' || (mytablerec.isNew && mydata['_id'] === 0)) && (mytablerec._id === undefined || mytablerec._id === '0')) {
|
||||
mytablerec._id = new ObjectID();
|
||||
mydata._id = new ObjectID();
|
||||
}
|
||||
@@ -1252,11 +1252,11 @@ router.post('/duprec/:table/:id', authenticate, async (req, res) => {
|
||||
send({ code: server_constants.RIS_CODE_ERR_UNAUTHORIZED, msg: '' });
|
||||
}
|
||||
|
||||
if (!User.isAdmin(req.user.perm) && !User.isManager(req.user.perm)) {
|
||||
/* if (!User.isAdmin(req.user.perm) && !User.isManager(req.user.perm)) {
|
||||
// If without permissions, exit
|
||||
return res.status(404).
|
||||
send({ code: server_constants.RIS_CODE_ERR_UNAUTHORIZED, msg: '' });
|
||||
}
|
||||
} */
|
||||
|
||||
return await mytable.findById(id).then(async (mydata) => {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user