OSDN Git Service

t#30473:fix authenticate
[pettanr/pettanr.git] / app / controllers / artists_controller.rb
index 850f045..c1f2384 100644 (file)
@@ -1,11 +1,10 @@
 class ArtistsController < ApplicationController
   layout 'test' if MagicNumber['test_layout']
   if MagicNumber['run_mode'] == 0
-    before_filter :authenticate_user!, :only => [:new, :create, :edit, :update, :destroy]
-    before_filter :authenticate_author, :only => [:new, :create, :edit, :update, :destroy]
+    before_filter :authenticate_user, :only => [:new, :create, :edit, :update, :destroy]
   else
-    before_filter :authenticate_user!, :only => [:index, :show, :new, :create, :edit, :update, :destroy]
-    before_filter :authenticate_author, :only => [:index, :show, :new, :create, :edit, :update, :destroy]
+    before_filter :authenticate_reader, :only => [:index, :show]
+    before_filter :authenticate_user, :only => [:new, :create, :edit, :update, :destroy]
   end
   before_filter :authenticate_admin!, :only => [:list, :browse]