OSDN Git Service

Merge branch 'v05' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v05client
[pettanr/pettanr.git] / app / controllers / panel_colors_controller.rb
index 84f5623..eaaf34d 100644 (file)
@@ -1,11 +1,12 @@
 class PanelColorsController < ApplicationController
   layout 'test' if MagicNumber['test_layout']
   if MagicNumber['run_mode'] == 0
-    before_filter :authenticate_user!, :only => []
+    before_filter :authenticate_user, :only => []
     before_filter :authenticate_author, :only => []
   else
-    before_filter :authenticate_user!, :only => [:index, :show]
-    before_filter :authenticate_author, :only => [:index, :show]
+    before_filter :authenticate_reader, :only => [:index, :show]
+    before_filter :authenticate_user, :only => []
+    before_filter :authenticate_author, :only => []
   end
 
   # GET /ground_pictures
@@ -22,7 +23,7 @@ class PanelColorsController < ApplicationController
   end
   
   def show
-    @panel_color = PanelColor.show(params[:id], @author)
+    @panel_color = PanelColor.show(params[:id], [@user, @admin])
     respond_to do |format|
       format.html # show.html.erb
       format.json { render json: @panel_color.to_json(PanelColor.show_json_opt) }