Permalink
Browse files

comment deletion fix

  • Loading branch information...
1 parent 4e207ae commit 49ecac2fe345ff2ca9bd99b2e2b990eaf390b5b0 @jywarren committed Dec 17, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 webserver/app/controllers/comments_controller.rb
@@ -7,7 +7,7 @@ def index
def delete
@comment = Comment.find(params[:id])
- if @comment.author == current_user.login || params[:password].to_i == APP_CONFIG["password"]
+ if @comment.author == current_user.login || params[:password].to_i == APP_CONFIG["password"] || current_user.role == "admin"
@comment.destroy
end
redirect_to "/spectra/show/"+@comment.spectrum_id.to_s if params[:index] != "true"

0 comments on commit 49ecac2

Please sign in to comment.