title: How to show content of collection to other users?
body: <p>At first I am a beginner in meteor. I am creating an app for school. Users can add something to a collection. My problem is that only the author sees the task at the moment. How can i fix it?</p>
  
  <p>Edit: My js code</p>
  
  <pre><code>
  
      if (Meteor.isClient) 
      {
      Template.Collection.onCreated(function() {
          var self = this;
          self.autorun(function() {
              self.subscribe('tasks');
          });
      });
  
      Template.Collection.helpers({
          tasks: ()=> {
              return tasks.find({inCollection: true});
          }
      });
  
      Template.Tasks.onCreated(function() {
          var self = this;
          self.autorun(function() {
              self.subscribe('tasks');
          });
      });
  
      Template.tasks.helpers({
          tasks: ()=> {
              return tasks.find({});    
          }
      });
  
      Template.Tasks.events({
          'click .new-task': () => {
              Session.set('newTask', true);
          }
      });
  
      Template.TaskSingle.onCreated(function() {
          var self = this;
          self.autorun(function() {
              var id = FlowRouter.getParam('id');
              self.subscribe('singleTask', id);
          });
      });
  
      Template.TaskSingle.helpers({
          task: ()=> {
              var id = FlowRouter.getParam('id');
              return Tasks.findOne({_id: id});
          }
      });
  
      Template.NewTask.events({
          'click .fa-close' : function() {
              Session.set('newTask', false);
          }
      });
  
      Template.Task.onCreated(function(){
         this.editMode = new ReactiveVar(false);
         // this.editMode = new ReactiveVar();
         //this.editMode.set(false);
      });
  
      Template.Task.helpers({
          updateTaskId: function() {
              return this._id;
          },
          editMode: function() {
              return Template.instance().editMode.get();
          }
      });
  
      Template.Task.events({
          'click .toggle-menu': function() {
              Meteor.call('toggleMenuItem', this._id, this.inCollection);
          },
          'click .fa-trash' : function() {
              Meteor.call('deleteTask', this._id);
          },
          'click .fa-pencil' : function(event, template) {
             template.editMode.set(!template.editMode.get());
          }
      });
  
  
      }
  
  
  
      if (Meteor.isServer) {
          Meteor.startup(function () {
              //code to run on server at startup      
      });
  
  
      Meteor.publish('tasks', function(){
          return tasks.find({author: this.userId});
      });
  
  
      Meteor.publish('singleTask', function(id){
          check(id, String);
          return Tasks.find({_id: id});
      });
  
      // Configure Accounts to require username instead of email
      Accounts.ui.config({
          passwordSignupFields: "USERNAME_ONLY"
      });
  
      }
  
  </code></pre>