This commit is contained in:
Paolo Arena
2021-02-18 12:19:35 +01:00
parent 88ae9af12c
commit 14a3292da2
22 changed files with 233 additions and 122 deletions

View File

@@ -188,7 +188,7 @@ ProjectSchema.statics.findAllProjByUserId = async function (userId, idapp) {
{
$and: [
{ idapp }, {
$or: [{ privacyread: server_constants.Privacy.all }, { userId: userId }],
$or: [{ privacyread: { $ne: server_constants.Privacy.onlyme } }, { userId: userId }],
}],
$or: [{ deleted: { $exists: false } }, { deleted: { $exists: true, $eq: false } }],
}
@@ -336,7 +336,7 @@ ProjectSchema.statics.enabletoModify = async function (userId, idProj) {
return Project.findOne({
'_id': idProj,
$or: [{
privacywrite: server_constants.Privacy.all,
privacywrite: { $ne: server_constants.Privacy.onlyme },
userId: userId
}]
}).then(ris => {