@@ -225,10 +225,16 @@ Team.prototype.activateUser = async function (user: User, admin: User) {
|
||||
|
||||
Team.prototype.collectionIds = async function (paranoid: boolean = true) {
|
||||
let models = await Collection.findAll({
|
||||
attributes: ["id", "private"],
|
||||
where: { teamId: this.id, private: false },
|
||||
attributes: ["id"],
|
||||
where: {
|
||||
teamId: this.id,
|
||||
permission: {
|
||||
[Op.ne]: null,
|
||||
},
|
||||
},
|
||||
paranoid,
|
||||
});
|
||||
|
||||
return models.map((c) => c.id);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user