Files
overleaf-cep/services/web/app/src/models/GroupPolicy.js
T
Miguel Serrano e01e3960c3 Merge pull request #23006 from overleaf/msm-chat-capabilities-poc-2
[web] Add option to disable chat for subscription

GitOrigin-RevId: 0052d060c74c39400496f7f9f54c820398d60012
2025-01-31 09:05:18 +00:00

36 lines
1.2 KiB
JavaScript

const mongoose = require('../infrastructure/Mongoose')
const { Schema } = mongoose
const GroupPolicySchema = new Schema(
{
// User can't delete their own account
userCannotDeleteOwnAccount: Boolean,
// User can't add a secondary email address, or affiliation
userCannotHaveSecondaryEmail: Boolean,
// User can't have an active (currently auto-renewing) personal subscription, nor can they start one
userCannotHaveSubscription: Boolean,
// User can't choose to leave the group subscription they are managed by
userCannotLeaveManagingGroupSubscription: Boolean,
// User can't have a Google SSO account, nor can they link it to their account
userCannotHaveGoogleSSO: Boolean,
// User can't have other third-party SSO (e.g. ORCID/IEEE) active on their account, nor can they link it to their account
userCannotHaveOtherThirdPartySSO: Boolean,
// User can't use any of our AI features, such as the compile-assistant
userCannotUseAIFeatures: Boolean,
// User can't use the chat feature
userCannotUseChat: Boolean,
},
{ minimize: false }
)
exports.GroupPolicy = mongoose.model('GroupPolicy', GroupPolicySchema)
exports.GroupPolicySchema = GroupPolicySchema