修复版本库
This commit is contained in:
parent
8b9793cace
commit
f08ab23492
|
@ -127,8 +127,9 @@ class AccountController < ApplicationController
|
||||||
@user.password, @user.password_confirmation = user_params[:password], user_params[:password_confirmation]
|
@user.password, @user.password_confirmation = user_params[:password], user_params[:password_confirmation]
|
||||||
system "htpasswd -mb "+@root_path+"user.passwd "+params[:user][:login]+" "+user_params[:password]
|
system "htpasswd -mb "+@root_path+"user.passwd "+params[:user][:login]+" "+user_params[:password]
|
||||||
system "echo -e '\n"+params[:user][:login]+"-write:"+
|
system "echo -e '\n"+params[:user][:login]+"-write:"+
|
||||||
" "+user_params[:password]+"' >> "+@root_path+"group.passwd"
|
" "+params[:user][:login]+"' >> "+@root_path+"group.passwd"
|
||||||
system "mkdir"+@root_path+"htdocs/"+params[:user][:login]
|
system "mkdir "+@root_path+"htdocs/"+params[:user][:login]
|
||||||
|
|
||||||
system "echo -e 'Allow from all \n Order Deny,Allow \n "+
|
system "echo -e 'Allow from all \n Order Deny,Allow \n "+
|
||||||
"<Limit PUT POST DELETE PROPPATCH MKCOL COPY MOVE LOCK UNLOCK> \n"+
|
"<Limit PUT POST DELETE PROPPATCH MKCOL COPY MOVE LOCK UNLOCK> \n"+
|
||||||
"Require group "+params[:user][:login]+"-write \n "+
|
"Require group "+params[:user][:login]+"-write \n "+
|
||||||
|
|
|
@ -64,13 +64,13 @@ class IssuesController < ApplicationController
|
||||||
if @query.valid?
|
if @query.valid?
|
||||||
case params[:format]
|
case params[:format]
|
||||||
when 'csv', 'pdf'
|
when 'csv', 'pdf'
|
||||||
@limit = Setting.issues_export_limit.to_i
|
@limit = 10#Setting.issues_export_limit.to_i
|
||||||
when 'atom'
|
when 'atom'
|
||||||
@limit = Setting.feeds_limit.to_i
|
@limit = 10#Setting.feeds_limit.to_i
|
||||||
when 'xml', 'json'
|
when 'xml', 'json'
|
||||||
@offset, @limit = api_offset_and_limit
|
@offset, @limit = api_offset_and_limit({:limit => 10})
|
||||||
else
|
else
|
||||||
@limit = per_page_option
|
@limit = 10#per_page_option
|
||||||
end
|
end
|
||||||
|
|
||||||
@issue_count = @query.issue_count
|
@issue_count = @query.issue_count
|
||||||
|
|
|
@ -112,6 +112,14 @@ class MyController < ApplicationController
|
||||||
if request.post?
|
if request.post?
|
||||||
if @user.check_password?(params[:password])
|
if @user.check_password?(params[:password])
|
||||||
@user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation]
|
@user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation]
|
||||||
|
system "echo -e '\n"+@user.login.to_s+"-write:"+
|
||||||
|
" "+@user.login.to_s+"' >> "+@root_path+"group.passwd"
|
||||||
|
system "mkdir "+@root_path+"htdocs/"+@user.login.to_s
|
||||||
|
system "echo -e 'Allow from all \n Order Deny,Allow \n "+
|
||||||
|
"<Limit PUT POST DELETE PROPPATCH MKCOL COPY MOVE LOCK UNLOCK> \n"+
|
||||||
|
"Require group "+@user.login.to_s+"-write \n "+
|
||||||
|
"</Limit> \n ' >>"+
|
||||||
|
@root_path+"htdocs/"+@user.login.to_s+"/.htaccess"
|
||||||
if @user.save
|
if @user.save
|
||||||
flash[:notice] = l(:notice_account_password_updated)
|
flash[:notice] = l(:notice_account_password_updated)
|
||||||
redirect_to my_account_path
|
redirect_to my_account_path
|
||||||
|
|
|
@ -96,12 +96,15 @@ class RepositoriesController < ApplicationController
|
||||||
|
|
||||||
@repository.project = @project
|
@repository.project = @project
|
||||||
if request.post? && @repository.save
|
if request.post? && @repository.save
|
||||||
if(!@repository_tag &¶ms[:repository_scm]=="Git")
|
if(params[:repository_scm]=="Git")
|
||||||
system "git init --bare "+@project_path
|
system "git init --bare "+@project_path
|
||||||
system "mv "+@project_path+"/hooks/post-update{.sample,}"
|
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 "cd "+@project_path+"/"
|
|
||||||
system "git update-server-info"
|
puts "before ======================================================================"
|
||||||
|
puts system "cd "+@project_path+" ;git update-server-info"
|
||||||
|
flag = system "cd "+@project_path+" ;git update-server-info"
|
||||||
|
puts "after flag:#{flag} ======================================================================"
|
||||||
@repository.update_attributes(:login => User.current.login.to_s)
|
@repository.update_attributes(:login => User.current.login.to_s)
|
||||||
end
|
end
|
||||||
redirect_to settings_project_path(@project, :tab => 'repositories')
|
redirect_to settings_project_path(@project, :tab => 'repositories')
|
||||||
|
@ -165,7 +168,10 @@ class RepositoriesController < ApplicationController
|
||||||
@repository.destroy if request.delete?
|
@repository.destroy if request.delete?
|
||||||
redirect_to settings_project_path(@project, :tab => 'repositories')
|
redirect_to settings_project_path(@project, :tab => 'repositories')
|
||||||
if(@repository.type=="Repository::Git")
|
if(@repository.type=="Repository::Git")
|
||||||
system "rm -r "+@repository_name
|
puts "before destroy system cmd ======================================="
|
||||||
|
puts "rm -r "+@root_path+@repository_name
|
||||||
|
flag = system "rm -r "+@root_path+"htdocs/"+@repository_name
|
||||||
|
puts "after destroy system cmd :#{flag} ======================================="
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -141,9 +141,9 @@ class UsersController < ApplicationController
|
||||||
|
|
||||||
case params[:format]
|
case params[:format]
|
||||||
when 'xml', 'json'
|
when 'xml', 'json'
|
||||||
@offset, @limit = api_offset_and_limit
|
@offset, @limit = api_offset_and_limit({:limit => 15})
|
||||||
else
|
else
|
||||||
@limit = per_page_option
|
@limit = 15#per_page_option
|
||||||
end
|
end
|
||||||
|
|
||||||
@status = params[:status] || 1
|
@status = params[:status] || 1
|
||||||
|
|
|
@ -59,7 +59,7 @@ class Changeset < ActiveRecord::Base
|
||||||
before_create :before_create_cs
|
before_create :before_create_cs
|
||||||
|
|
||||||
# fq
|
# fq
|
||||||
after_create :act_as_activity
|
# after_create :act_as_activity
|
||||||
# end
|
# end
|
||||||
|
|
||||||
def revision=(r)
|
def revision=(r)
|
||||||
|
|
|
@ -26,22 +26,24 @@
|
||||||
<td><%=h repository.url %></td>
|
<td><%=h repository.url %></td>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<td class="buttons">
|
<td class="buttons" style="text-align:left">
|
||||||
<% if repository.scm_name=="Subversion"%>
|
<% if repository.scm_name=="Subversion"%>
|
||||||
<%if User.current.allowed_to?(:manage_repository, @project) %>
|
<%if User.current.allowed_to?(:manage_repository, @project) %>
|
||||||
<%= link_to(l(:button_edit), edit_repository_path(repository),
|
<%= link_to(l(:label_user_plural), committers_repository_path(repository),
|
||||||
:class => 'icon icon-edit') %>
|
:class => 'icon icon-user') %>
|
||||||
<%= link_to(l(:label_user_plural), committers_repository_path(repository),
|
<%= link_to(l(:button_edit), edit_repository_path(repository),
|
||||||
:class => 'icon icon-user') %>
|
:class => 'icon icon-edit') %>
|
||||||
<%= delete_link repository_path(repository) %>
|
<%= delete_link repository_path(repository) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% elsif repository.scm_name=="Git"%>
|
<% elsif repository.scm_name=="Git"%>
|
||||||
<%if User.current.allowed_to?(:manage_repository, @project) %>
|
<%if User.current.allowed_to?(:manage_repository, @project) %>
|
||||||
<!-- <%= link_to(l(:button_edit), edit_repository_path(repository),
|
<!-- <%= link_to(l(:button_edit), edit_repository_path(repository),
|
||||||
:class => 'icon icon-edit') %> -->
|
:class => 'icon icon-edit') %> -->
|
||||||
<%= link_to(l(:label_user_plural), committers_repository_path(repository),
|
<%= link_to(l(:label_user_plural), committers_repository_path(repository),
|
||||||
:class => 'icon icon-user') %>
|
:class => 'icon icon-user') %>
|
||||||
<%= delete_link repository_path(repository) %>
|
<% if repository.login.to_s==User.current.login.to_s %>
|
||||||
|
<%= delete_link repository_path(repository) %>
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -431,7 +431,7 @@ RedmineApp::Application.routes.draw do
|
||||||
match 'bids/:id/show_project', :controller => 'bids', :action => 'show_project', :as => 'project_for_bid'
|
match 'bids/:id/show_project', :controller => 'bids', :action => 'show_project', :as => 'project_for_bid'
|
||||||
match 'bids/:id/add', :controller => 'bids', :action => 'add'
|
match 'bids/:id/add', :controller => 'bids', :action => 'add'
|
||||||
## 测试用
|
## 测试用
|
||||||
match 'test/index', :controller => 'test', :action => 'index'
|
# match 'test/index', :controller => 'test', :action => 'index'
|
||||||
# added by young
|
# added by young
|
||||||
match 'bids', :controller => 'bids', :action => 'index'
|
match 'bids', :controller => 'bids', :action => 'index'
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
# Settings can be defined through the application in Admin -> Settings
|
# Settings can be defined through the application in Admin -> Settings
|
||||||
|
|
||||||
app_title:
|
app_title:
|
||||||
default: Redmine
|
default: Trustie2
|
||||||
app_subtitle:
|
app_subtitle:
|
||||||
default: Project management
|
default: Project management
|
||||||
welcome_text:
|
welcome_text:
|
||||||
|
@ -56,7 +56,7 @@ activity_days_default:
|
||||||
per_page_options:
|
per_page_options:
|
||||||
default: '25,50,100'
|
default: '25,50,100'
|
||||||
mail_from:
|
mail_from:
|
||||||
default: redmine@example.net
|
default: trustie2@163.com
|
||||||
bcc_recipients:
|
bcc_recipients:
|
||||||
default: 1
|
default: 1
|
||||||
plain_text_mail:
|
plain_text_mail:
|
||||||
|
@ -68,7 +68,7 @@ cache_formatted_text:
|
||||||
wiki_compression:
|
wiki_compression:
|
||||||
default: ""
|
default: ""
|
||||||
default_language:
|
default_language:
|
||||||
default: en
|
default: zh
|
||||||
host_name:
|
host_name:
|
||||||
default: localhost:3000
|
default: localhost:3000
|
||||||
protocol:
|
protocol:
|
||||||
|
@ -230,8 +230,6 @@ non_working_week_days:
|
||||||
default:
|
default:
|
||||||
- '6'
|
- '6'
|
||||||
- '7'
|
- '7'
|
||||||
|
|
||||||
|
|
||||||
#### added by liuping
|
#### added by liuping
|
||||||
show_tags_length:
|
show_tags_length:
|
||||||
format: int
|
format: int
|
||||||
|
|
Loading…
Reference in New Issue