- layout 'test' if Pettanr::TestLayout
- before_filter :authenticate_user!, :only => [:index, :show, :new, :edit, :create, :update, :destroy]
- before_filter :authenticate_admin!, :only => [:list, :browse]
-
- public
+ layout 'test' if MagicNumber['test_layout']
+ if MagicNumber['run_mode'] == 0
+ before_filter :authenticate_user, :only => [:new, :edit, :create, :update, :destroy, :catch]
+ before_filter :authenticate_author, :only => [:new, :edit, :create, :update, :destroy, :catch]
+ else
+ before_filter :authenticate_reader, :only => [:index, :show, :scroll_panels, :scrolls, :sheet_panels, :sheets, :panel_pictures, :speech_balloons, :ground_pictures, :ground_colors, :by_scroll, :by_sheet, :by_author]
+ before_filter :authenticate_user, :only => [:new, :edit, :create, :update, :destroy, :catch]
+ before_filter :authenticate_author, :only => [:new, :edit, :create, :update, :destroy, :catch]
+ end
+
+ def self.model
+ Panel
+ end