fix filters & seeds
This commit is contained in:
parent
03e51c3058
commit
8f4a0bd174
4 changed files with 21 additions and 20 deletions
|
@ -8,7 +8,7 @@ class ProjectsController < ApplicationController
|
|||
before_filter :add_project_abilities
|
||||
before_filter :authorize_read_project!, :except => [:index, :new, :create]
|
||||
before_filter :authorize_admin_project!, :only => [:edit, :update, :destroy]
|
||||
before_filter :require_non_empty_project, :only => [:blob, :tree]
|
||||
before_filter :require_non_empty_project, :only => [:blob, :tree, :graph]
|
||||
before_filter :load_refs, :only => :tree # load @branch, @tag & @ref
|
||||
|
||||
def index
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
class RefsController < ApplicationController
|
||||
before_filter :project
|
||||
before_filter :ref
|
||||
before_filter :define_tree_vars, :only => [:tree, :blob]
|
||||
layout "project"
|
||||
|
||||
# Authorize
|
||||
before_filter :add_project_abilities
|
||||
before_filter :authorize_read_project!
|
||||
before_filter :require_non_empty_project
|
||||
|
||||
before_filter :ref
|
||||
before_filter :define_tree_vars, :only => [:tree, :blob]
|
||||
layout "project"
|
||||
|
||||
def switch
|
||||
new_path = if params[:destination] == "tree"
|
||||
tree_project_ref_path(@project, params[:ref])
|
||||
|
|
|
@ -180,7 +180,7 @@ class Project < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def repo_name
|
||||
if path == "gitosis-admin"
|
||||
if path == "gitosis-admin" && path == "gitolite-admin"
|
||||
errors.add(:path, " like 'gitosis-admin' is not allowed")
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue