OSDN Git Service
(root)
/
pettanr
/
pettanr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
t#30558:fix auth filter
[pettanr/pettanr.git]
/
app
/
controllers
/
balloons_controller.rb
diff --git
a/app/controllers/balloons_controller.rb
b/app/controllers/balloons_controller.rb
index
cb01d58
..
d3c6727
100644
(file)
--- a/
app/controllers/balloons_controller.rb
+++ b/
app/controllers/balloons_controller.rb
@@
-2,9
+2,11
@@
class BalloonsController < ApplicationController
layout 'test' if MagicNumber['test_layout']
if MagicNumber['run_mode'] == 0
before_filter :authenticate_user, :only => []
layout 'test' if MagicNumber['test_layout']
if MagicNumber['run_mode'] == 0
before_filter :authenticate_user, :only => []
+ before_filter :authenticate_author, :only => []
else
before_filter :authenticate_reader, :only => [:index, :show]
before_filter :authenticate_user, :only => []
else
before_filter :authenticate_reader, :only => [:index, :show]
before_filter :authenticate_user, :only => []
+ before_filter :authenticate_author, :only => []
end
before_filter :authenticate_admin!, :only => [:list, :browse]
end
before_filter :authenticate_admin!, :only => [:list, :browse]
@@
-20,7
+22,7
@@
class BalloonsController < ApplicationController
end
def show
end
def show
- @balloon = Balloon.show(params[:id], [@
autho
r, @admin])
+ @balloon = Balloon.show(params[:id], [@
use
r, @admin])
respond_to do |format|
format.html # show.html.erb
format.json { render json: @balloon.to_json(Balloon.show_json_opt) }
respond_to do |format|
format.html # show.html.erb
format.json { render json: @balloon.to_json(Balloon.show_json_opt) }