OSDN Git Service

t#30443:add test for open mode
[pettanr/pettanr.git] / app / controllers / panel_colors_controller.rb
index 8351715..84f5623 100644 (file)
@@ -1,7 +1,12 @@
 class PanelColorsController < ApplicationController
   layout 'test' if MagicNumber['test_layout']
-  before_filter :authenticate_user!, :only => [:index, :show]
-  before_filter :authenticate_author, :only => [:index, :show]
+  if MagicNumber['run_mode'] == 0
+    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]
+  end
 
   # GET /ground_pictures
   # GET /ground_pictures.json