ActivityTypes = new Mongo.Collection('activityTypes');

var ActivityTypesSchema = new SimpleSchema({
  name: {
    type: String
  }
});

ActivityTypes.allow({
  insert () {
    // Get current user ID
    const currentUserId = Meteor.userId();

    // Chack if user is administrator
    const userIsAdmin = Roles.userIsInRole(currentUserId, 'admin');

    // Only Admin user can insert
    return userIsAdmin;
  },
  remove () {
    // Get current user ID
    const currentUserId = Meteor.userId();

    // Chack if user is administrator
    const userIsAdmin = Roles.userIsInRole(currentUserId, 'admin');

    // Only Admin user can remove
    return userIsAdmin;
  },
  update () {
    // Get current user ID
    const currentUserId = Meteor.userId();

    // Chack if user is administrator
    const userIsAdmin = Roles.userIsInRole(currentUserId, 'admin');

    // Only Admin user can update
    return userIsAdmin;
  }
});

// Add i18n tags
ActivityTypesSchema.i18n("activityTypes");

ActivityTypes.attachSchema(ActivityTypesSchema);

ActivityTypes = new Mongo.Collection('activityTypes');

var ActivityTypesSchema = new SimpleSchema({
  name: {
    type: String
  }
});

ActivityTypes.allow({
  insert () {
    // Get current user ID
    const currentUserId = Meteor.userId();

    // Chack if user is administrator
    const userIsAdmin = Roles.userIsInRole(currentUserId);

    // Only Admin user can insert
    return userIsAdmin;
  },
  remove () {
    // Get current user ID
    const currentUserId = Meteor.userId();

    // Chack if user is administrator
    const userIsAdmin = Roles.userIsInRole(currentUserId);

    // Only Admin user can remove
    return userIsAdmin;
  },
  update () {
    // Get current user ID
    const currentUserId = Meteor.userId();

    // Chack if user is administrator
    const userIsAdmin = Roles.userIsInRole(currentUserId);

    // Only Admin user can update
    return userIsAdmin;
  }
});

// Add i18n tags
ActivityTypesSchema.i18n("activityTypes");

ActivityTypes.attachSchema(ActivityTypesSchema);

--- 
+++ 
@@ -12,7 +12,7 @@
     const currentUserId = Meteor.userId();
 
     // Chack if user is administrator
-    const userIsAdmin = Roles.userIsInRole(currentUserId, 'admin');
+    const userIsAdmin = Roles.userIsInRole(currentUserId);
 
     // Only Admin user can insert
     return userIsAdmin;
@@ -22,7 +22,7 @@
     const currentUserId = Meteor.userId();
 
     // Chack if user is administrator
-    const userIsAdmin = Roles.userIsInRole(currentUserId, 'admin');
+    const userIsAdmin = Roles.userIsInRole(currentUserId);
 
     // Only Admin user can remove
     return userIsAdmin;
@@ -32,7 +32,7 @@
     const currentUserId = Meteor.userId();
 
     // Chack if user is administrator
-    const userIsAdmin = Roles.userIsInRole(currentUserId, 'admin');
+    const userIsAdmin = Roles.userIsInRole(currentUserId);
 
     // Only Admin user can update
     return userIsAdmin;
Fix allow rules (admin check)
