fixes and cleanups for new auth model

This commit is contained in:
Kyle Drake 2014-10-12 08:42:32 -07:00
parent 21b0848030
commit f44ce014d3
8 changed files with 63 additions and 32 deletions

2
app.rb
View file

@ -557,6 +557,8 @@ end
def require_ownership_for_settings
@site = Site[username: params[:username]]
not_found if @site.nil?
unless @site.owned_by? parent_site
flash[:error] = 'Cannot edit this site, you do not have permission.'
redirect request.referrer