Private - Solo i membri possono vedere chi fa parte del gruppo
Hidden - il Gruppo non sarà visibile nella ricerca
This commit is contained in:
@@ -1036,8 +1036,6 @@ module.exports = {
|
|||||||
await this.sendNotifGroupByUsername(cmd, idapp, usernameOrig, usernameOrig, username_action, groupname, false);
|
await this.sendNotifGroupByUsername(cmd, idapp, usernameOrig, usernameOrig, username_action, groupname, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('e', e);
|
console.error('e', e);
|
||||||
}
|
}
|
||||||
@@ -1769,10 +1767,15 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let filteradmin = false;
|
||||||
if (params.filtercustom) {
|
if (params.filtercustom) {
|
||||||
let condition = {};
|
let condition = {};
|
||||||
for (const myfilter of params.filtercustom) {
|
for (const myfilter of params.filtercustom) {
|
||||||
|
|
||||||
|
if (!!myfilter.admins) {
|
||||||
|
filteradmin = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (myfilter['pub_to_share'] === shared_consts.PUBTOSHARE.ONLY_GROUPS_FOLLOW) {
|
if (myfilter['pub_to_share'] === shared_consts.PUBTOSHARE.ONLY_GROUPS_FOLLOW) {
|
||||||
|
|
||||||
let arraygroups = [];
|
let arraygroups = [];
|
||||||
@@ -1854,6 +1857,23 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (params.table === 'mygroups') {
|
||||||
|
// BINARY CHECK (?): const filter = [{ visibility: { $bitsAnyClear: [1] } }];
|
||||||
|
// if (!User.isAdmin(req.user.perm)) {
|
||||||
|
// not Visibility_Group.HIDDEN
|
||||||
|
if (true && !filteradmin) {
|
||||||
|
const filter = [
|
||||||
|
{
|
||||||
|
visibility: {
|
||||||
|
$nin: [shared_consts.Visibility_Group.HIDDEN]
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
||||||
|
query.push({$match: {$and: filter}});
|
||||||
|
}
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// VECCHIA VERSIONE
|
// VECCHIA VERSIONE
|
||||||
const q1 = this.getLookup(params, 1);
|
const q1 = this.getLookup(params, 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user