- before_filter :authenticate_author!, :only => [:top, :index, :show, :play, :create, :update, :destroy]
- before_filter :authenticate_admin!, :only => [:list, :browse]
+ if Manifest.manifest.magic_numbers['run_mode'] == 0
+ before_filter :authenticate_user, :only => [:new, :create, :edit, :update, :destroy]
+ before_filter :authenticate_author, :only => [:new, :create, :edit, :update, :destroy]
+ else
+ before_filter :authenticate_reader, :only => [
+ :index, :show, :play, :by_story, :by_author, :count, :count_by_story, :count_by_author
+ ]
+ before_filter :authenticate_user, :only => [:new, :create, :edit, :update, :destroy]
+ before_filter :authenticate_author, :only => [:new, :create, :edit, :update, :destroy]
+ end