Fix bug where an rejected announcement could still be edited by url
This commit is contained in:
parent
6130f8b1e4
commit
db1b84e962
|
@ -89,12 +89,16 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
||||||
# GET /bulletins/1/edit
|
# GET /bulletins/1/edit
|
||||||
def edit
|
def edit
|
||||||
@bulletin = Bulletin.find(params[:id])
|
@bulletin = Bulletin.find(params[:id])
|
||||||
# @summary_variable = @bulletin.summary_variable
|
if @bulletin.is_rejected?
|
||||||
|
redirect_to :action => :index
|
||||||
@link_url = panel_announcement_back_end_bulletin_path(@bulletin)
|
else
|
||||||
|
# @summary_variable = @bulletin.summary_variable
|
||||||
get_categorys
|
|
||||||
get_tags
|
@link_url = panel_announcement_back_end_bulletin_path(@bulletin)
|
||||||
|
|
||||||
|
get_categorys
|
||||||
|
get_tags
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# POST /bulletins
|
# POST /bulletins
|
||||||
|
|
Loading…
Reference in New Issue