feat: add showPublicScores and showPublicOpinions flags to services with plan-based access control

This commit is contained in:
2026-07-22 14:05:39 -03:00
parent da3c3abb52
commit 279e1b54cc
19 changed files with 391 additions and 43 deletions
@@ -67,6 +67,8 @@ export class CompaniesAdapterMongoose implements ICompaniesAdapter {
fixedPostIds: { type: Array, required: false },
banned: { type: Boolean, required: false, default: false },
showPublicScores: { type: Boolean, required: false, default: true },
showPublicOpinions: { type: Boolean, required: false, default: true },
});
this.companyList = model<ICompanyDocument>("Company", this.schema);
@@ -235,6 +237,14 @@ export class CompaniesAdapterMongoose implements ICompaniesAdapter {
updateCompany.banned = data.banned;
}
if (data.showPublicScores !== undefined) {
updateCompany.showPublicScores = data.showPublicScores;
}
if (data.showPublicOpinions !== undefined) {
updateCompany.showPublicOpinions = data.showPublicOpinions;
}
updateCompany.save();
//actualizo los campos correspondientes a la localizacion de los servicios de la organizacion.