Only owner can remove project

This commit is contained in:
Dmitriy Zaporozhets 2012-12-05 06:14:05 +03:00
parent 6ea6ab7c8d
commit cc0295b789
6 changed files with 13 additions and 5 deletions

View file

@ -112,6 +112,10 @@ class ApplicationController < ActionController::Base
render file: Rails.root.join("public", "404"), layout: false, status: "404"
end
def render_403
render file: Rails.root.join("public", "403"), layout: false, status: "403"
end
def require_non_empty_project
redirect_to @project if @project.empty_repo?
end