<commit_before>import SimpleSchema from "simpl-schema";
import UserEventLog from "/both/collections/userEventLog";

Permissions = new Mongo.Collection("permissions");

const PermissionsSchema = new SimpleSchema({
  userId: {
    type: String
  },
  groupId: {
    type: String
  },
  isManager: {
    type: Boolean
  }
});

Permissions.attachSchema(PermissionsSchema);

Meteor.startup(function() {
  if (Meteor.isServer) {
    // Make sure residentId field is indexed for performance
    Permissions._ensureIndex({ userId: 1 });

    // Make sure groupId field is indexed for performance
    Permissions._ensureIndex({ groupId: 1 });
  }
});
<commit_msg>ismanager is false by default<commit_after>import SimpleSchema from "simpl-schema";
import UserEventLog from "/both/collections/userEventLog";

Permissions = new Mongo.Collection("permissions");

const PermissionsSchema = new SimpleSchema({
  userId: {
    type: String
  },
  groupId: {
    type: String
  },
  isManager: {
    type: Boolean,
    defaultValue: false
  }
});

Permissions.attachSchema(PermissionsSchema);

Meteor.startup(function() {
  if (Meteor.isServer) {
    // Make sure residentId field is indexed for performance
    Permissions._ensureIndex({ userId: 1 });

    // Make sure groupId field is indexed for performance
    Permissions._ensureIndex({ groupId: 1 });
  }
});

{'fraction_non_alphanumeric': 0.11267605633802817, 'fraction_numerical': 0.0029651593773165306, 'mean_word_length': 3.981549815498155, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7301551', 'n_tokens_mistral': 403, 'n_tokens_neox': 392, 'n_words': 106}