Compare commits

..

1 Commits

Author SHA1 Message Date
Jean-Philippe Lang
63f11b1355 tagged version 0.6.3
git-svn-id: http://redmine.rubyforge.org/svn/tags/0.6.3@1012 e93f8b46-1217-0410-a6f0-8f06a7374b81
2007-12-18 19:02:44 +00:00
22 changed files with 119 additions and 144 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.member_of?(membership.project))
membership.project.is_public? || (User.current.role_for_project(membership.project))
end
rescue ActiveRecord::RecordNotFound
render_404

View File

@@ -27,7 +27,6 @@ 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,8 +74,6 @@ 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="selected"><%= l(:label_jump_to_a_project) %></option>
<option disabled="disabled">---</option>
<option selected><%= l(:label_jump_to_a_project) %></option>
<option 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.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.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 %>
<%= "(#{news.comments_count} #{lwr(:label_comment, news.comments_count).downcase})" if news.comments_count > 0 %></span>
<br />
<% unless news.summary.blank? %><span class="summary"><%=h news.summary %></span><br /><% end %>
<span class="author"><%= authoring news.created_on, news.author %></span></p>
<span class="author"><%= authoring news.created_on, news.author %></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,6 +24,12 @@
<%= 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 %>
@@ -32,13 +38,6 @@
<% 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, :null => true
change_column :versions, :effective_date, :date, :default => nil
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, :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
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
end
def self.down

View File

@@ -1,23 +1,10 @@
== Redmine changelog
Redmine - project management software
Copyright (C) 2006-2008 Jean-Philippe Lang
Copyright (C) 2006-2007 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

View File

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

View File

@@ -1,7 +1,7 @@
== Redmine upgrade procedure
Redmine - project management software
Copyright (C) 2006-2008 Jean-Philippe Lang
Copyright (C) 2006-2007 Jean-Philippe Lang
http://www.redmine.org/
@@ -20,10 +20,16 @@ http://www.redmine.org/
6. Copy the RAILS_ROOT/files directory content into your new installation
Note 1: Rails 1.2.6 or higher is required
Note 1: Rails 1.2.2 or higher is required for version 0.4.2 and later.
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
logger.error("SCM command failed: #{cmd}\n with: #{e.message}")
log.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"
cmd = "#{HG_BIN} -R #{target('')} --cwd #{target(path)} locate -X */*/*"
cmd << " -r #{identifier.to_i}" if identifier
cmd << " " + shell_quote('glob:**')
cmd << " * */*"
shellout(cmd) do |io|
io.each_line do |line|
e = line.chomp.split(%r{[\/\\]})
e = line.chomp.split('\\')
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].to_s.split.collect{|path| {:action => 'X', :path => "/#{path}"}}
:paths => changeset[:files].split.collect{|path| {:action => 'X', :path => "/#{path}"}}
})
end
return nil if $? && $?.exitstatus != 0

View File

@@ -69,8 +69,4 @@ 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 = 4
TINY = 3
def self.revision
revision = nil

View File

@@ -39,9 +39,6 @@ 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});
if (window.parseStylesheets) { window.parseStylesheets(); }
}})
new Ajax.Updater({success:'context-menu'}, '../../issues/context_menu/' + id, {asynchronous:true, evalScripts:true, onComplete:function(request){Effect.Appear('context-menu', {duration: 0.20})}})
}
}

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%; margin-bottom: 1.2em;}
.autoscroll {overflow-x: auto; padding:1px; width:100%;}
#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:168px; /* IE6 */
left:128px; /* IE */
top:-2px;
}
#context-menu li.folder>ul { left:148px; }

View File

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

View File

@@ -35,88 +35,83 @@ class RepositoriesMercurialControllerTest < Test::Unit::TestCase
Repository::Mercurial.create(:project => Project.find(3), :url => REPOSITORY_PATH)
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_show
get :show, :id => 3
assert_response :success
assert_template 'show'
assert_not_nil assigns(:entries)
assert_not_nil assigns(:changesets)
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 =/ }
end
else
puts "Mercurial test repository NOT FOUND. Skipping functional tests !!!"
def test_fake; assert true 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 =/ }
end
end