diff --git a/app/controllers/boards_controller.rb b/app/controllers/boards_controller.rb
index 26b345948..999544e7b 100644
--- a/app/controllers/boards_controller.rb
+++ b/app/controllers/boards_controller.rb
@@ -18,7 +18,8 @@
class BoardsController < ApplicationController
layout 'base_projects'#by young
default_search_scope :messages
- before_filter :find_project_by_project_id, :find_board_if_available, :authorize
+ before_filter :find_project_by_project_id, :find_board_if_available
+ before_filter :authorize, :except => [:new, :show, :create]
accept_rss_auth :index, :show
helper :sort
diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb
index 5ae6d3bb1..27d195f0d 100644
--- a/app/controllers/messages_controller.rb
+++ b/app/controllers/messages_controller.rb
@@ -21,7 +21,7 @@ class MessagesController < ApplicationController
before_filter :find_board, :only => [:new, :preview]
before_filter :find_attachments, :only => [:preview]
before_filter :find_message, :except => [:new, :preview]
- before_filter :authorize, :except => [:preview, :edit, :destroy]
+ before_filter :authorize, :except => [:preview, :edit, :destroy, :new]
helper :boards
helper :watchers
diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb
index 2c6b92d08..94de4bfbb 100644
--- a/app/controllers/repositories_controller.rb
+++ b/app/controllers/repositories_controller.rb
@@ -33,7 +33,7 @@ class RepositoriesController < ApplicationController
before_filter :find_repository, :only => [:edit, :update, :destroy, :committers]
before_filter :find_project_repository, :except => [:new, :create, :newcreate, :edit, :update, :destroy, :committers, :newrepo]
before_filter :find_changeset, :only => [:revision, :add_related_issue, :remove_related_issue]
- before_filter :authorize , :except => [:newrepo,:newcreate]
+ before_filter :authorize , :except => [:newrepo,:newcreate,:fork]
accept_rss_auth :revisions
@@ -55,19 +55,24 @@ class RepositoriesController < ApplicationController
end
def fork
+ @repository_url = params[:repository_url]
+
+ # @repository.url
# system "htpasswd -mb "+@root_path+"user.passwd "+params[:repository][:identifier]+" "+@upasswd
# system "echo -e '"+params[:project_id]+"-"+params[:repository][:identifier]+"-write:"+
# " "+params[:repository][:identifier]+"' >> "+@root_path+"group.passwd"
- # system "git init --bare "+@project_path
+ system "git clone --bare "+@repository_url
# system "mv "+@project_path+"/hooks/post-update{.sample,}"
- # system "chmod a+x"+@project_path+"/hooks/post-update"
+ # system "chmod a+x "+@project_path+"/hooks/post-update"
# system "."+@project_path+"/hooks/post-update"
# system "echo -e 'Allow from all \n Order Deny,Allow \n "+
# " \n"+
# "Require group "+params[:project_id]+"-"+params[:repository][:identifier]+"-write \n "+
# " \n ' >>"+
# @project_path+"/.htaccess"
- render :action => "show"
+ flash[:notice] = l(:label_notice_fork_successed)
+ @repositories = @project.repositories
+ render :action => 'show', :layout => 'base_projects'
end
def create
@@ -76,8 +81,9 @@ class RepositoriesController < ApplicationController
@repository_name=User.current.login.to_s+"/"+params[:repository][:identifier]+".git"
@project_path=@root_path+"htdocs/"+@repository_name
@repository_tag=params[:repository][:upassword]
- @repo_name=User.current.login.to_s+"-"+params[:repository][:identifier]
- @middle=User.current.login.to_s+"-"+params[:repository][:identifier]+"-write:"
+ @repo_name=User.current.login.to_s+"_"+params[:repository][:identifier]
+ logger.info "htpasswd -mb "+@root_path+"user.passwd "+@repo_name+": "+@repository_tag
+ logger.info "the value of create repository"+@root_path+": "+@repository_name+": "+@project_path+": "+@repo_name
attrs = pickup_extra_info
if((@repository_tag!="")&¶ms[:repository_scm]=="Git")
params[:repository][:url]=@project_path
@@ -93,9 +99,8 @@ class RepositoriesController < ApplicationController
@repository.project = @project
if request.post? && @repository.save
if(params[:repository_scm]=="Git")
- system "htpasswd -mb "+@root_path+" "+@repo_name+" "+@repository_tag
- logger.info "htpasswd -mb "+@root_path+" "+@repo_name+" "+@repository_tag+create_passwd
- system "echo -e '\n"+@repo_name+"-write:"+
+ system "htpasswd -mb "+@root_path+"user.passwd "+@repo_name+" "+@repository_tag
+ system "echo -e '"+@repo_name+"-write:"+
" "+@repo_name+"' >> "+@root_path+"group.passwd"
system "mkdir "+@root_path+"htdocs/"+User.current.login.to_s
system "git init --bare "+@project_path
@@ -172,10 +177,14 @@ class RepositoriesController < ApplicationController
def destroy
@root_path="/home/pdl/redmine-2.3.2-0/apache2/"
+ @repo_name=User.current.login.to_s+"_"+@repository.identifier.to_s
@repository_name=User.current.login.to_s+"/"+@repository.identifier.to_s+".git"
+ @middle=User.current.login.to_s+"_"+@repository.identifier.to_s+"-write:"
@repository.destroy if request.delete?
redirect_to settings_project_path(@project, :tab => 'repositories')
- if(@repository.type=="Repository::Git")
+ if(@repository.type=="Repository::Git")
+ logger.info "destory the repository value"+"root path"+@root_path+"repo_name"+@repo_name+
+ "repository_name"+@repository_name+"user group"+@middle
system "sed -i /"+@repo_name+"/{d} "+@root_path+"user.passwd"
system "sed -i /"+@middle+"/{d} "+@root_path+"group.passwd"
system "rm -r "+@root_path+"htdocs/"+@repository_name
diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb
index b11cacd52..354e3f996 100644
--- a/app/views/issues/index.html.erb
+++ b/app/views/issues/index.html.erb
@@ -1,9 +1,10 @@
-
+
<%= l(:field_issue) %>
+
<%= link_to l(:label_issue_new), { :controller => 'issues', :action => 'new', :copy_from => nil }, :param => :project_id, :caption => :label_issue_new,
:html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) }, :class => 'icon icon-add' %>
-
+
<% if !@query.new_record? && @query.editable_by?(User.current) %>
<%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %>
@@ -19,7 +20,7 @@