de-prioritize shooting yourself in the foot

This commit is contained in:
Kyle Drake 2014-08-14 11:01:56 -07:00
parent 08026ac235
commit 19ad676df6
3 changed files with 33 additions and 5 deletions

4
app.rb
View file

@ -1154,11 +1154,9 @@ end
post '/site/delete' do
require_login
if current_site.username != params[:username]
errors.add :username, 'Could not delete site, site name did not match.'
current_site.errors.add :username, 'Could not delete site, site name did not match.'
halt erb(:settings)
end
end
def require_admin