mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-24 21:12:38 -04:00
27 lines
900 B
JavaScript
27 lines
900 B
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
|
||
|
userCannotAddSecondaryEmail: 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 Google/Twitter/ORCID SSO active on their account, nor can they link it to their account
|
||
|
userCannotHaveThirdPartySSO: Boolean,
|
||
|
},
|
||
|
{ minimize: false }
|
||
|
)
|
||
|
|
||
|
exports.GroupPolicy = mongoose.model('GroupPolicy', GroupPolicySchema)
|
||
|
exports.GroupPolicySchema = GroupPolicySchema
|