Files
overleaf-cep/services/web/app/src/models/GroupPolicy.js
T
Jimmy Domagala-Tang 75a138c5d1 Merge pull request #18784 from overleaf/bg-allow-combined-group-policies
allow combined group policies

GitOrigin-RevId: b23fb0454f794e9094e8e15e732b4322a48ac1ee
2024-06-24 12:04:13 +00:00

33 lines
1.1 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,
},
{ minimize: false }
)
exports.GroupPolicy = mongoose.model('GroupPolicy', GroupPolicySchema)
exports.GroupPolicySchema = GroupPolicySchema