refcatoring. cleaning after gitosis
This commit is contained in:
parent
8134fe0efe
commit
bdc658095c
13 changed files with 58 additions and 124 deletions
|
@ -3,8 +3,8 @@ class ApplicationController < ActionController::Base
|
|||
protect_from_forgery
|
||||
helper_method :abilities, :can?
|
||||
|
||||
rescue_from Gitlabhq::Gitosis::AccessDenied, Gitlabhq::Gitolite::AccessDenied do |exception|
|
||||
render :file => File.join(Rails.root, "public", "gitosis_error"), :layout => false
|
||||
rescue_from Gitlabhq::Gitolite::AccessDenied do |exception|
|
||||
render :file => File.join(Rails.root, "public", "githost_error"), :layout => false
|
||||
end
|
||||
|
||||
layout :layout_by_resource
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
class ErrorsController < ApplicationController
|
||||
def gitosis
|
||||
render :file => File.join(Rails.root, "public", "gitosis_error"), :layout => false
|
||||
def githost
|
||||
render :file => File.join(Rails.root, "public", "githost_error"), :layout => false
|
||||
end
|
||||
end
|
||||
|
|
|
@ -42,8 +42,8 @@ class ProjectsController < ApplicationController
|
|||
format.js
|
||||
end
|
||||
end
|
||||
rescue Gitlabhq::Gitosis::AccessDenied, Gitlabhq::Gitolite::AccessDenied
|
||||
render :js => "location.href = '#{errors_gitosis_path}'" and return
|
||||
rescue Gitlabhq::Gitolite::AccessDenied
|
||||
render :js => "location.href = '#{errors_githost_path}'" and return
|
||||
rescue StandardError => ex
|
||||
@project.errors.add(:base, "Cant save project. Please try again later")
|
||||
respond_to do |format|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue