Compare commits

...

11 Commits
1.1.0 ... 0.6.4

Author SHA1 Message Date
Jean-Philippe Lang
033f595713 tagged version 0.6.4
git-svn-id: http://redmine.rubyforge.org/svn/tags/0.6.4@1251 e93f8b46-1217-0410-a6f0-8f06a7374b81
2008-03-15 07:43:51 +00:00
Jean-Philippe Lang
13ec81598b Docs updated for 0.6.4 release.
git-svn-id: http://redmine.rubyforge.org/svn/branches/0.6-stable@1233 e93f8b46-1217-0410-a6f0-8f06a7374b81
2008-03-12 18:06:43 +00:00
Jean-Philippe Lang
a677817003 Merged r1231 from trunk.
git-svn-id: http://redmine.rubyforge.org/svn/branches/0.6-stable@1232 e93f8b46-1217-0410-a6f0-8f06a7374b81
2008-03-12 17:57:46 +00:00
Jean-Philippe Lang
abaeecbaa9 Merged Mercurial browsing fix from trunk (r1228 and r1229).
git-svn-id: http://redmine.rubyforge.org/svn/branches/0.6-stable@1230 e93f8b46-1217-0410-a6f0-8f06a7374b81
2008-03-12 17:54:50 +00:00
Jean-Philippe Lang
75d652d9e5 Ported r1169 from trunk.
git-svn-id: http://redmine.rubyforge.org/svn/branches/0.6-stable@1170 e93f8b46-1217-0410-a6f0-8f06a7374b81
2008-02-22 17:28:17 +00:00
Jean-Philippe Lang
7e9dd78de8 Ported r1034 and r1140 from trunk.
git-svn-id: http://redmine.rubyforge.org/svn/branches/0.6-stable@1141 e93f8b46-1217-0410-a6f0-8f06a7374b81
2008-02-12 21:14:58 +00:00
Jean-Philippe Lang
bd7542cf98 Merged r1015, r1019, r1022 to r1025, r1045 and r1047 from trunk.
git-svn-id: http://redmine.rubyforge.org/svn/branches/0.6-stable@1048 e93f8b46-1217-0410-a6f0-8f06a7374b81
2008-01-07 20:46:54 +00:00
Jean-Philippe Lang
a2c18b2037 Ported r1036 from trunk.
git-svn-id: http://redmine.rubyforge.org/svn/branches/0.6-stable@1041 e93f8b46-1217-0410-a6f0-8f06a7374b81
2008-01-05 13:12:30 +00:00
Jean-Philippe Lang
eb86e5e7e1 Changes for 0.6.3 release.
git-svn-id: http://redmine.rubyforge.org/svn/branches/0.6-stable@1010 e93f8b46-1217-0410-a6f0-8f06a7374b81
2007-12-18 18:12:18 +00:00
Jean-Philippe Lang
fc26668cd9 Fixed: upload doesn't work in "Files" section.
git-svn-id: http://redmine.rubyforge.org/svn/branches/0.6-stable@1009 e93f8b46-1217-0410-a6f0-8f06a7374b81
2007-12-18 18:04:10 +00:00
Jean-Philippe Lang
2b42e3fc50 Added 0.6 stable branch.
git-svn-id: http://redmine.rubyforge.org/svn/branches/0.6-stable@1008 e93f8b46-1217-0410-a6f0-8f06a7374b81
2007-12-18 17:53:13 +00:00
23 changed files with 150 additions and 120 deletions

View File

@@ -30,7 +30,7 @@ class AccountController < ApplicationController
# show only public projects and private projects that the logged in user is also a member of
@memberships = @user.memberships.select do |membership|
membership.project.is_public? || (User.current.role_for_project(membership.project))
membership.project.is_public? || (User.current.member_of?(membership.project))
end
rescue ActiveRecord::RecordNotFound
render_404

View File

@@ -339,7 +339,7 @@ class ProjectsController < ApplicationController
def add_file
if request.post?
@version = @project.versions.find_by_id(params[:version_id])
attachments = attach_files(@issue, params[:attachments])
attachments = attach_files(@version, params[:attachments])
Mailer.deliver_attachments_added(attachments) if !attachments.empty? && Setting.notified_events.include?('file_added')
redirect_to :controller => 'projects', :action => 'list_files', :id => @project
end

View File

@@ -27,6 +27,7 @@ class AuthSourceLdap < AuthSource
end
def authenticate(login, password)
return nil if login.blank? || password.blank?
attrs = []
# get user's DN
ldap_con = initialize_ldap_con(self.account, self.account_password)

View File

@@ -74,6 +74,8 @@ class User < ActiveRecord::Base
# Returns the user that matches provided login and password, or nil
def self.try_to_login(login, password)
# Make sure no one can sign in with an empty password
return nil if password.to_s.empty?
user = find(:first, :conditions => ["login=?", login])
if user
# user is already in local database

View File

@@ -1,7 +1,7 @@
<% user_projects_by_root = User.current.projects.find(:all, :include => :parent).group_by(&:root) %>
<select onchange="if (this.value != '') { window.location = this.value; }">
<option selected><%= l(:label_jump_to_a_project) %></option>
<option disabled>---</option>
<option selected="selected"><%= l(:label_jump_to_a_project) %></option>
<option disabled="disabled">---</option>
<% user_projects_by_root.keys.sort.each do |root| %>
<%= content_tag('option', h(root.name), :value => url_for(:controller => 'projects', :action => 'show', :id => root)) %>
<% user_projects_by_root[root].sort.each do |project| %>

View File

@@ -1,4 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title><%=h html_title %></title>
@@ -73,7 +73,7 @@
<div id="ajax-indicator" style="display:none;"><span><%= l(:label_loading) %></span></div>
<div id="footer">
Powered by <%= link_to Redmine::Info.app_name, Redmine::Info.url %> <%= Redmine::VERSION %> &copy 2006-2007 Jean-Philippe Lang
Powered by <%= link_to Redmine::Info.app_name, Redmine::Info.url %> <%= Redmine::VERSION %> &copy; 2006-2007 Jean-Philippe Lang
</div>
</body>
</html>

View File

@@ -1,6 +1,6 @@
<p><%= link_to(h(news.project.name), :controller => 'projects', :action => 'show', :id => news.project) + ': ' unless @project %>
<%= link_to h(news.title), :controller => 'news', :action => 'show', :id => news %>
<%= "(#{news.comments_count} #{lwr(:label_comment, news.comments_count).downcase})" if news.comments_count > 0 %></span>
<%= "(#{news.comments_count} #{lwr(:label_comment, news.comments_count).downcase})" if news.comments_count > 0 %>
<br />
<% unless news.summary.blank? %><span class="summary"><%=h news.summary %></span><br /><% end %>
<span class="author"><%= authoring news.created_on, news.author %></p>
<span class="author"><%= authoring news.created_on, news.author %></span></p>

View File

@@ -11,9 +11,9 @@
<%= select_tag 'type', options_for_select([[l(:label_diff_inline), "inline"], [l(:label_diff_side_by_side), "sbs"]], @diff_type), :onchange => "if (this.value != '') {this.form.submit()}" %></p>
<% end %>
<div class="autoscroll">
<% cache(@cache_key) do %>
<% @diff.each do |table_file| %>
<div class="autoscroll">
<% if @diff_type == 'sbs' %>
<table class="filecontent CodeRay">
<thead>
@@ -84,9 +84,9 @@
</tbody>
</table>
<% end %>
<% end %>
<% end %>
</div>
<% end %>
<% end %>
<% content_for :header_tags do %>
<%= stylesheet_link_tag "scm" %>

View File

@@ -24,12 +24,6 @@
<%= link_to_attachments @page.attachments, :delete_url => (authorize_for('wiki', 'destroy_attachment') ? {:controller => 'wiki', :action => 'destroy_attachment', :page => @page.title} : nil) %>
<div class="contextual">
<%= l(:label_export_to) %>
<%= link_to 'HTML', {:page => @page.title, :export => 'html', :version => @content.version}, :class => 'icon icon-html' %>,
<%= link_to 'TXT', {:page => @page.title, :export => 'txt', :version => @content.version}, :class => 'icon icon-txt' %>
</div>
<% if authorize_for('wiki', 'add_attachment') %>
<p><%= toggle_link l(:label_attachment_new), "add_attachment_form" %></p>
<% form_tag({ :controller => 'wiki', :action => 'add_attachment', :page => @page.title }, :multipart => true, :class => "tabular", :id => "add_attachment_form", :style => "display:none;") do %>
@@ -38,6 +32,13 @@
<% end %>
<% end %>
<div class="contextual">
<%= l(:label_export_to) %>
<%= link_to 'HTML', {:page => @page.title, :export => 'html', :version => @content.version}, :class => 'icon icon-html' %>,
<%= link_to 'TXT', {:page => @page.title, :export => 'txt', :version => @content.version}, :class => 'icon icon-txt' %>
</div>
&nbsp;
<% content_for :header_tags do %>
<%= stylesheet_link_tag 'scm' %>
<% end %>

View File

@@ -1,6 +1,6 @@
class AllowNullVersionEffectiveDate < ActiveRecord::Migration
def self.up
change_column :versions, :effective_date, :date, :default => nil
change_column :versions, :effective_date, :date, :default => nil, :null => true
end
def self.down

View File

@@ -1,11 +1,11 @@
class AllowNullPosition < ActiveRecord::Migration
def self.up
# removes the 'not null' constraint on position fields
change_column :issue_statuses, :position, :integer, :default => 1
change_column :roles, :position, :integer, :default => 1
change_column :trackers, :position, :integer, :default => 1
change_column :boards, :position, :integer, :default => 1
change_column :enumerations, :position, :integer, :default => 1
change_column :issue_statuses, :position, :integer, :default => 1, :null => true
change_column :roles, :position, :integer, :default => 1, :null => true
change_column :trackers, :position, :integer, :default => 1, :null => true
change_column :boards, :position, :integer, :default => 1, :null => true
change_column :enumerations, :position, :integer, :default => 1, :null => true
end
def self.down

View File

@@ -1,10 +1,28 @@
== Redmine changelog
Redmine - project management software
Copyright (C) 2006-2007 Jean-Philippe Lang
Copyright (C) 2006-2008 Jean-Philippe Lang
http://www.redmine.org/
== 2007-03-12 v0.6.4
* Fixed: private projects name are displayed on account/show even if the current user doesn't have access to these private projects
* Fixed: potential LDAP authentication security flaw
* Fixed: context submenus on the issue list don't show up with IE6.
* Fixed: Themes are not applied with Rails 2.0
* Fixed: crash when fetching Mercurial changesets if changeset[:files] is nil
* Fixed: Mercurial repository browsing
* Fixed: undefined local variable or method 'log' in CvsAdapter when a cvs command fails
* Fixed: not null constraints not removed with Postgresql
* Doctype set to transitional
== 2007-12-18 v0.6.3
* Fixed: upload doesn't work in 'Files' section
== 2007-12-16 v0.6.2
* Search engine: issue custom fields can now be searched

View File

@@ -1,13 +1,13 @@
== Redmine installation
Redmine - project management software
Copyright (C) 2006-2007 Jean-Philippe Lang
Copyright (C) 2006-2008 Jean-Philippe Lang
http://www.redmine.org/
== Requirements
* Ruby on Rails 1.2.5 or 2.0.1
* Ruby on Rails 1.2.6 or 2.0.2
* A database (see compatibility below)
Optional:

View File

@@ -1,7 +1,7 @@
== Redmine upgrade procedure
Redmine - project management software
Copyright (C) 2006-2007 Jean-Philippe Lang
Copyright (C) 2006-2008 Jean-Philippe Lang
http://www.redmine.org/
@@ -20,16 +20,10 @@ http://www.redmine.org/
6. Copy the RAILS_ROOT/files directory content into your new installation
Note 1: Rails 1.2.2 or higher is required for version 0.4.2 and later.
Note 1: Rails 1.2.6 or higher is required
Note 2: when upgrading your code with svn update, don't forget to clear
the application cache (RAILS_ROOT/tmp/cache) before restarting.
Note 3: settings previously defined in custom_config.rb are now stored
in database, as of version 0.4.2. Go to "Admin -> Settings" to edit them.
== From 0.2.x and below
Due to major database changes since 0.2.x, there is no migration support
from 0.2.x and previous versions.

View File

@@ -119,7 +119,7 @@ module Redmine
end
rescue Errno::ENOENT => e
# The command failed, log it and re-raise
log.error("SCM command failed: #{cmd}\n with: #{e.message}")
logger.error("SCM command failed: #{cmd}\n with: #{e.message}")
raise CommandFailed
end
end

View File

@@ -43,12 +43,12 @@ module Redmine
def entries(path=nil, identifier=nil)
path ||= ''
entries = Entries.new
cmd = "#{HG_BIN} -R #{target('')} --cwd #{target(path)} locate -X */*/*"
cmd = "#{HG_BIN} -R #{target('')} --cwd #{target(path)} locate"
cmd << " -r #{identifier.to_i}" if identifier
cmd << " * */*"
cmd << " " + shell_quote('glob:**')
shellout(cmd) do |io|
io.each_line do |line|
e = line.chomp.split('\\')
e = line.chomp.split(%r{[\/\\]})
entries << Entry.new({:name => e.first,
:path => (path.empty? ? e.first : "#{path}/#{e.first}"),
:kind => (e.size > 1 ? 'dir' : 'file'),
@@ -112,7 +112,7 @@ module Redmine
:author => changeset[:user],
:time => Time.parse(changeset[:date]),
:message => changeset[:description],
:paths => changeset[:files].split.collect{|path| {:action => 'X', :path => "/#{path}"}}
:paths => changeset[:files].to_s.split.collect{|path| {:action => 'X', :path => "/#{path}"}}
})
end
return nil if $? && $?.exitstatus != 0

View File

@@ -69,4 +69,8 @@ module ApplicationHelper
super((@current_theme && @current_theme.stylesheets.include?(source)) ?
"/themes/#{@current_theme.dir}/stylesheets/#{source}" : source)
end
def path_to_stylesheet(source)
stylesheet_path source
end
end

View File

@@ -4,7 +4,7 @@ module Redmine
module VERSION #:nodoc:
MAJOR = 0
MINOR = 6
TINY = 2
TINY = 4
def self.revision
revision = nil

View File

@@ -39,6 +39,9 @@ ContextMenu.prototype = {
this.selection = tr;
var id = tr.id.substring(6, tr.id.length);
/* TODO: do not hard code path */
new Ajax.Updater({success:'context-menu'}, '../../issues/context_menu/' + id, {asynchronous:true, evalScripts:true, onComplete:function(request){Effect.Appear('context-menu', {duration: 0.20})}})
new Ajax.Updater({success:'context-menu'}, '../../issues/context_menu/' + id, {asynchronous:true, evalScripts:true, onComplete:function(request){
Effect.Appear('context-menu', {duration: 0.20});
if (window.parseStylesheets) { window.parseStylesheets(); }
}})
}
}

View File

@@ -123,7 +123,7 @@ hr { width: 100%; height: 1px; background: #ccc; border: 0;}
textarea.wiki-edit { width: 99%; }
li p {margin-top: 0;}
div.issue {background:#ffffdd; padding:6px; margin-bottom:6px;border: 1px solid #d7d7d7;}
.autoscroll {overflow-x: auto; padding:1px; width:100%;}
.autoscroll {overflow-x: auto; padding:1px; width:100%; margin-bottom: 1.2em;}
#user_firstname, #user_lastname, #user_mail, #my_account_form select { width: 90%; }
/***** Tabular forms ******/

View File

@@ -24,7 +24,7 @@
}
#context-menu li.folder ul {
position:absolute;
left:128px; /* IE */
left:168px; /* IE6 */
top:-2px;
}
#context-menu li.folder>ul { left:148px; }

View File

@@ -117,4 +117,6 @@ function getElementsBySelect(rule) {
return nodes;
}
window.parseStylesheets = parseStylesheets;
</script>

View File

@@ -35,83 +35,88 @@ class RepositoriesMercurialControllerTest < Test::Unit::TestCase
Repository::Mercurial.create(:project => Project.find(3), :url => REPOSITORY_PATH)
end
def test_show
get :show, :id => 3
assert_response :success
assert_template 'show'
assert_not_nil assigns(:entries)
assert_not_nil assigns(:changesets)
end
if File.directory?(REPOSITORY_PATH)
def test_show
get :show, :id => 3
assert_response :success
assert_template 'show'
assert_not_nil assigns(:entries)
assert_not_nil assigns(:changesets)
end
def test_browse_root
get :browse, :id => 3
assert_response :success
assert_template 'browse'
assert_not_nil assigns(:entries)
assert_equal 3, assigns(:entries).size
assert assigns(:entries).detect {|e| e.name == 'images' && e.kind == 'dir'}
assert assigns(:entries).detect {|e| e.name == 'sources' && e.kind == 'dir'}
assert assigns(:entries).detect {|e| e.name == 'README' && e.kind == 'file'}
end
def test_browse_directory
get :browse, :id => 3, :path => ['images']
assert_response :success
assert_template 'browse'
assert_not_nil assigns(:entries)
assert_equal 2, assigns(:entries).size
entry = assigns(:entries).detect {|e| e.name == 'edit.png'}
assert_not_nil entry
assert_equal 'file', entry.kind
assert_equal 'images/edit.png', entry.path
end
def test_changes
get :changes, :id => 3, :path => ['images', 'edit.png']
assert_response :success
assert_template 'changes'
assert_tag :tag => 'h2', :content => 'edit.png'
end
def test_entry_show
get :entry, :id => 3, :path => ['sources', 'watchers_controller.rb']
assert_response :success
assert_template 'entry'
# Line 19
assert_tag :tag => 'th',
:content => /10/,
:attributes => { :class => /line-num/ },
:sibling => { :tag => 'td', :content => /WITHOUT ANY WARRANTY/ }
end
def test_entry_download
get :entry, :id => 3, :path => ['sources', 'watchers_controller.rb'], :format => 'raw'
assert_response :success
# File content
assert @response.body.include?('WITHOUT ANY WARRANTY')
end
def test_browse_root
get :browse, :id => 3
assert_response :success
assert_template 'browse'
assert_not_nil assigns(:entries)
assert_equal 3, assigns(:entries).size
assert assigns(:entries).detect {|e| e.name == 'images' && e.kind == 'dir'}
assert assigns(:entries).detect {|e| e.name == 'sources' && e.kind == 'dir'}
assert assigns(:entries).detect {|e| e.name == 'README' && e.kind == 'file'}
end
def test_browse_directory
get :browse, :id => 3, :path => ['images']
assert_response :success
assert_template 'browse'
assert_not_nil assigns(:entries)
assert_equal 2, assigns(:entries).size
entry = assigns(:entries).detect {|e| e.name == 'edit.png'}
assert_not_nil entry
assert_equal 'file', entry.kind
assert_equal 'images/edit.png', entry.path
end
def test_changes
get :changes, :id => 3, :path => ['images', 'edit.png']
assert_response :success
assert_template 'changes'
assert_tag :tag => 'h2', :content => 'edit.png'
end
def test_entry_show
get :entry, :id => 3, :path => ['sources', 'watchers_controller.rb']
assert_response :success
assert_template 'entry'
# Line 19
assert_tag :tag => 'th',
:content => /10/,
:attributes => { :class => /line-num/ },
:sibling => { :tag => 'td', :content => /WITHOUT ANY WARRANTY/ }
end
def test_entry_download
get :entry, :id => 3, :path => ['sources', 'watchers_controller.rb'], :format => 'raw'
assert_response :success
# File content
assert @response.body.include?('WITHOUT ANY WARRANTY')
end
def test_diff
# Full diff of changeset 4
get :diff, :id => 3, :rev => 4
assert_response :success
assert_template 'diff'
# Line 22 removed
assert_tag :tag => 'th',
:content => /22/,
:sibling => { :tag => 'td',
:attributes => { :class => /diff_out/ },
:content => /def remove/ }
end
def test_annotate
get :annotate, :id => 3, :path => ['sources', 'watchers_controller.rb']
assert_response :success
assert_template 'annotate'
# Line 23, revision 4
assert_tag :tag => 'th', :content => /23/,
:sibling => { :tag => 'td', :child => { :tag => 'a', :content => /4/ } },
:sibling => { :tag => 'td', :content => /jsmith/ },
:sibling => { :tag => 'td', :content => /watcher =/ }
def test_diff
# Full diff of changeset 4
get :diff, :id => 3, :rev => 4
assert_response :success
assert_template 'diff'
# Line 22 removed
assert_tag :tag => 'th',
:content => /22/,
:sibling => { :tag => 'td',
:attributes => { :class => /diff_out/ },
:content => /def remove/ }
end
def test_annotate
get :annotate, :id => 3, :path => ['sources', 'watchers_controller.rb']
assert_response :success
assert_template 'annotate'
# Line 23, revision 4
assert_tag :tag => 'th', :content => /23/,
:sibling => { :tag => 'td', :child => { :tag => 'a', :content => /4/ } },
:sibling => { :tag => 'td', :content => /jsmith/ },
:sibling => { :tag => 'td', :content => /watcher =/ }
end
else
puts "Mercurial test repository NOT FOUND. Skipping functional tests !!!"
def test_fake; assert true end
end
end