diff --git a/app/controllers/collections_controller.rb b/app/controllers/collections_controller.rb index 912a6a68c906116a0aa59bb7e075e1a576c9451b..71d487f35c0d7ddfb404795f40f3972fb25578bf 100644 --- a/app/controllers/collections_controller.rb +++ b/app/controllers/collections_controller.rb @@ -1,11 +1,15 @@ class CollectionsController < ApplicationController before_action :set_collection, only: [:show, :update, :destroy, :like, :add_learning_object] - before_action :authenticate_user!, except: [:index, :show] + before_action :authenticate_user!, only: [:show, :update, :destroy, :like, :add_learning_object] # GET /collections # GET /collections.json def index - @collections = collection_repository.all current_user + if user_signed_in? + @collections = collection_repository.all Collections::UserPublicContext.new(current_user) + else + @collections = collection_repository.all + end end # GET /collections/1