Compare commits

..

1 Commits

Author SHA1 Message Date
Jean-Philippe Lang
78db2984fa tagged version 0.8.7
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/tags/0.8.7@3057 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-11-15 10:22:28 +00:00
5 changed files with 4 additions and 23 deletions

View File

@@ -188,12 +188,12 @@ class AccountController < ApplicationController
private
def logged_user=(user)
reset_session
if user && user.is_a?(User)
User.current = user
session[:user_id] = user.id
else
User.current = User.anonymous
session[:user_id] = nil
end
end
end

View File

@@ -28,7 +28,7 @@
<p><%= f.select :category_id, (@project.issue_categories.collect {|c| [c.name, c.id]}), :include_blank => true %>
<%= prompt_to_remote(l(:label_issue_category_new),
l(:label_issue_category_new), 'category[name]',
{:controller => 'projects', :action => 'add_issue_category', :id => @project, :authenticity_token => form_authenticity_token},
{:controller => 'projects', :action => 'add_issue_category', :id => @project},
:class => 'small', :tabindex => 199) if authorize_for('projects', 'add_issue_category') %></p>
<% end %>
<%= content_tag('p', f.select(:fixed_version_id,

View File

@@ -1,7 +1,7 @@
<% @entries.each do |entry| %>
<% tr_id = Digest::MD5.hexdigest(entry.path)
depth = params[:depth].to_i %>
<tr id="<%= tr_id %>" class="<%= h params[:parent_id] %> entry <%= entry.kind %>">
<tr id="<%= tr_id %>" class="<%= params[:parent_id] %> entry <%= entry.kind %>">
<td style="padding-left: <%=18 * depth%>px;" class="filename">
<% if entry.is_dir? %>
<span class="expander" onclick="<%= remote_function :url => {:action => 'browse', :id => @project, :path => to_path_param(entry.path), :rev => @rev, :depth => (depth + 1), :parent_id => tr_id},

View File

@@ -69,8 +69,7 @@ function setPredecessorFieldsVisibility() {
function promptToRemote(text, param, url) {
value = prompt(text + ':');
if (value) {
var sep = (url.indexOf('?') < 0 ? '?' : '&' )
new Ajax.Request(url + sep + param + '=' + encodeURIComponent(value), {asynchronous:true, evalScripts:true});
new Ajax.Request(url + '?' + param + '=' + encodeURIComponent(value), {asynchronous:true, evalScripts:true});
return false;
}
}

View File

@@ -147,24 +147,6 @@ class AccountTest < ActionController::IntegrationTest
assert user.hashed_password.blank?
end
def test_login_and_logout_should_clear_session
get '/login'
sid = session.session_id
post '/login', :username => 'admin', :password => 'admin'
assert_redirected_to 'my/page'
assert_not_equal sid, session.session_id, "login should reset session"
assert_equal 1, session[:user_id]
sid = session.session_id
get '/'
assert_equal sid, session.session_id
get '/logout'
assert_not_equal sid, session.session_id, "logout should reset session"
assert_nil session[:user_id]
end
else
puts 'Mocha is missing. Skipping tests.'
end