##// END OF EJS Templates
Added a system setting for allowing OpenID logins and registrations...
Eric Davis -
r2388:8d53e433c55b
parent child
Show More
@@ -1,278 +1,278
1 # Redmine - project management software
1 # Redmine - project management software
2 # Copyright (C) 2006-2008 Jean-Philippe Lang
2 # Copyright (C) 2006-2008 Jean-Philippe Lang
3 #
3 #
4 # This program is free software; you can redistribute it and/or
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
7 # of the License, or (at your option) any later version.
8 #
8 #
9 # This program is distributed in the hope that it will be useful,
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
12 # GNU General Public License for more details.
13 #
13 #
14 # You should have received a copy of the GNU General Public License
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
17
18 class AccountController < ApplicationController
18 class AccountController < ApplicationController
19 helper :custom_fields
19 helper :custom_fields
20 include CustomFieldsHelper
20 include CustomFieldsHelper
21
21
22 # prevents login action to be filtered by check_if_login_required application scope filter
22 # prevents login action to be filtered by check_if_login_required application scope filter
23 skip_before_filter :check_if_login_required, :only => [:login, :lost_password, :register, :activate]
23 skip_before_filter :check_if_login_required, :only => [:login, :lost_password, :register, :activate]
24
24
25 # Show user's account
25 # Show user's account
26 def show
26 def show
27 @user = User.active.find(params[:id])
27 @user = User.active.find(params[:id])
28 @custom_values = @user.custom_values
28 @custom_values = @user.custom_values
29
29
30 # show only public projects and private projects that the logged in user is also a member of
30 # show only public projects and private projects that the logged in user is also a member of
31 @memberships = @user.memberships.select do |membership|
31 @memberships = @user.memberships.select do |membership|
32 membership.project.is_public? || (User.current.member_of?(membership.project))
32 membership.project.is_public? || (User.current.member_of?(membership.project))
33 end
33 end
34
34
35 events = Redmine::Activity::Fetcher.new(User.current, :author => @user).events(nil, nil, :limit => 10)
35 events = Redmine::Activity::Fetcher.new(User.current, :author => @user).events(nil, nil, :limit => 10)
36 @events_by_day = events.group_by(&:event_date)
36 @events_by_day = events.group_by(&:event_date)
37
37
38 rescue ActiveRecord::RecordNotFound
38 rescue ActiveRecord::RecordNotFound
39 render_404
39 render_404
40 end
40 end
41
41
42 # Login request and validation
42 # Login request and validation
43 def login
43 def login
44 if request.get?
44 if request.get?
45 # Logout user
45 # Logout user
46 self.logged_user = nil
46 self.logged_user = nil
47 else
47 else
48 # Authenticate user
48 # Authenticate user
49 unless using_open_id?
49 if using_open_id? && Setting.openid?
50 password_authentication
51 else
52 open_id_authenticate(params[:openid_url])
50 open_id_authenticate(params[:openid_url])
51 else
52 password_authentication
53 end
53 end
54 end
54 end
55 end
55 end
56
56
57 # Log out current user and redirect to welcome page
57 # Log out current user and redirect to welcome page
58 def logout
58 def logout
59 cookies.delete :autologin
59 cookies.delete :autologin
60 Token.delete_all(["user_id = ? AND action = ?", User.current.id, 'autologin']) if User.current.logged?
60 Token.delete_all(["user_id = ? AND action = ?", User.current.id, 'autologin']) if User.current.logged?
61 self.logged_user = nil
61 self.logged_user = nil
62 redirect_to home_url
62 redirect_to home_url
63 end
63 end
64
64
65 # Enable user to choose a new password
65 # Enable user to choose a new password
66 def lost_password
66 def lost_password
67 redirect_to(home_url) && return unless Setting.lost_password?
67 redirect_to(home_url) && return unless Setting.lost_password?
68 if params[:token]
68 if params[:token]
69 @token = Token.find_by_action_and_value("recovery", params[:token])
69 @token = Token.find_by_action_and_value("recovery", params[:token])
70 redirect_to(home_url) && return unless @token and !@token.expired?
70 redirect_to(home_url) && return unless @token and !@token.expired?
71 @user = @token.user
71 @user = @token.user
72 if request.post?
72 if request.post?
73 @user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation]
73 @user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation]
74 if @user.save
74 if @user.save
75 @token.destroy
75 @token.destroy
76 flash[:notice] = l(:notice_account_password_updated)
76 flash[:notice] = l(:notice_account_password_updated)
77 redirect_to :action => 'login'
77 redirect_to :action => 'login'
78 return
78 return
79 end
79 end
80 end
80 end
81 render :template => "account/password_recovery"
81 render :template => "account/password_recovery"
82 return
82 return
83 else
83 else
84 if request.post?
84 if request.post?
85 user = User.find_by_mail(params[:mail])
85 user = User.find_by_mail(params[:mail])
86 # user not found in db
86 # user not found in db
87 flash.now[:error] = l(:notice_account_unknown_email) and return unless user
87 flash.now[:error] = l(:notice_account_unknown_email) and return unless user
88 # user uses an external authentification
88 # user uses an external authentification
89 flash.now[:error] = l(:notice_can_t_change_password) and return if user.auth_source_id
89 flash.now[:error] = l(:notice_can_t_change_password) and return if user.auth_source_id
90 # create a new token for password recovery
90 # create a new token for password recovery
91 token = Token.new(:user => user, :action => "recovery")
91 token = Token.new(:user => user, :action => "recovery")
92 if token.save
92 if token.save
93 Mailer.deliver_lost_password(token)
93 Mailer.deliver_lost_password(token)
94 flash[:notice] = l(:notice_account_lost_email_sent)
94 flash[:notice] = l(:notice_account_lost_email_sent)
95 redirect_to :action => 'login'
95 redirect_to :action => 'login'
96 return
96 return
97 end
97 end
98 end
98 end
99 end
99 end
100 end
100 end
101
101
102 # User self-registration
102 # User self-registration
103 def register
103 def register
104 redirect_to(home_url) && return unless Setting.self_registration? || session[:auth_source_registration]
104 redirect_to(home_url) && return unless Setting.self_registration? || session[:auth_source_registration]
105 if request.get?
105 if request.get?
106 session[:auth_source_registration] = nil
106 session[:auth_source_registration] = nil
107 @user = User.new(:language => Setting.default_language)
107 @user = User.new(:language => Setting.default_language)
108 else
108 else
109 @user = User.new(params[:user])
109 @user = User.new(params[:user])
110 @user.admin = false
110 @user.admin = false
111 @user.status = User::STATUS_REGISTERED
111 @user.status = User::STATUS_REGISTERED
112 if session[:auth_source_registration]
112 if session[:auth_source_registration]
113 @user.status = User::STATUS_ACTIVE
113 @user.status = User::STATUS_ACTIVE
114 @user.login = session[:auth_source_registration][:login]
114 @user.login = session[:auth_source_registration][:login]
115 @user.auth_source_id = session[:auth_source_registration][:auth_source_id]
115 @user.auth_source_id = session[:auth_source_registration][:auth_source_id]
116 if @user.save
116 if @user.save
117 session[:auth_source_registration] = nil
117 session[:auth_source_registration] = nil
118 self.logged_user = @user
118 self.logged_user = @user
119 flash[:notice] = l(:notice_account_activated)
119 flash[:notice] = l(:notice_account_activated)
120 redirect_to :controller => 'my', :action => 'account'
120 redirect_to :controller => 'my', :action => 'account'
121 end
121 end
122 else
122 else
123 @user.login = params[:user][:login]
123 @user.login = params[:user][:login]
124 @user.password, @user.password_confirmation = params[:password], params[:password_confirmation]
124 @user.password, @user.password_confirmation = params[:password], params[:password_confirmation]
125
125
126 case Setting.self_registration
126 case Setting.self_registration
127 when '1'
127 when '1'
128 register_by_email_activation(@user)
128 register_by_email_activation(@user)
129 when '3'
129 when '3'
130 register_automatically(@user)
130 register_automatically(@user)
131 else
131 else
132 register_manually_by_administrator(@user)
132 register_manually_by_administrator(@user)
133 end
133 end
134 end
134 end
135 end
135 end
136 end
136 end
137
137
138 # Token based account activation
138 # Token based account activation
139 def activate
139 def activate
140 redirect_to(home_url) && return unless Setting.self_registration? && params[:token]
140 redirect_to(home_url) && return unless Setting.self_registration? && params[:token]
141 token = Token.find_by_action_and_value('register', params[:token])
141 token = Token.find_by_action_and_value('register', params[:token])
142 redirect_to(home_url) && return unless token and !token.expired?
142 redirect_to(home_url) && return unless token and !token.expired?
143 user = token.user
143 user = token.user
144 redirect_to(home_url) && return unless user.status == User::STATUS_REGISTERED
144 redirect_to(home_url) && return unless user.status == User::STATUS_REGISTERED
145 user.status = User::STATUS_ACTIVE
145 user.status = User::STATUS_ACTIVE
146 if user.save
146 if user.save
147 token.destroy
147 token.destroy
148 flash[:notice] = l(:notice_account_activated)
148 flash[:notice] = l(:notice_account_activated)
149 end
149 end
150 redirect_to :action => 'login'
150 redirect_to :action => 'login'
151 end
151 end
152
152
153 private
153 private
154 def logged_user=(user)
154 def logged_user=(user)
155 if user && user.is_a?(User)
155 if user && user.is_a?(User)
156 User.current = user
156 User.current = user
157 session[:user_id] = user.id
157 session[:user_id] = user.id
158 else
158 else
159 User.current = User.anonymous
159 User.current = User.anonymous
160 session[:user_id] = nil
160 session[:user_id] = nil
161 end
161 end
162 end
162 end
163
163
164 def password_authentication
164 def password_authentication
165 user = User.try_to_login(params[:username], params[:password])
165 user = User.try_to_login(params[:username], params[:password])
166 if user.nil?
166 if user.nil?
167 # Invalid credentials
167 # Invalid credentials
168 flash.now[:error] = l(:notice_account_invalid_creditentials)
168 flash.now[:error] = l(:notice_account_invalid_creditentials)
169 elsif user.new_record?
169 elsif user.new_record?
170 # Onthefly creation failed, display the registration form to fill/fix attributes
170 # Onthefly creation failed, display the registration form to fill/fix attributes
171 @user = user
171 @user = user
172 session[:auth_source_registration] = {:login => user.login, :auth_source_id => user.auth_source_id }
172 session[:auth_source_registration] = {:login => user.login, :auth_source_id => user.auth_source_id }
173 render :action => 'register'
173 render :action => 'register'
174 else
174 else
175 # Valid user
175 # Valid user
176 successful_authentication(user)
176 successful_authentication(user)
177 end
177 end
178 end
178 end
179
179
180
180
181 def open_id_authenticate(openid_url)
181 def open_id_authenticate(openid_url)
182 authenticate_with_open_id(openid_url, :required => [:nickname, :fullname, :email], :return_to => signin_url) do |result, identity_url, registration|
182 authenticate_with_open_id(openid_url, :required => [:nickname, :fullname, :email], :return_to => signin_url) do |result, identity_url, registration|
183 if result.successful?
183 if result.successful?
184 user = User.find_or_initialize_by_identity_url(identity_url)
184 user = User.find_or_initialize_by_identity_url(identity_url)
185 if user.new_record?
185 if user.new_record?
186 # Self-registration off
186 # Self-registration off
187 redirect_to(home_url) && return unless Setting.self_registration?
187 redirect_to(home_url) && return unless Setting.self_registration?
188
188
189 # Create on the fly
189 # Create on the fly
190 user.login = registration['nickname'] unless registration['nickname'].nil?
190 user.login = registration['nickname'] unless registration['nickname'].nil?
191 user.mail = registration['email'] unless registration['email'].nil?
191 user.mail = registration['email'] unless registration['email'].nil?
192 user.firstname, user.lastname = registration['fullname'].split(' ') unless registration['fullname'].nil?
192 user.firstname, user.lastname = registration['fullname'].split(' ') unless registration['fullname'].nil?
193 user.random_password
193 user.random_password
194 user.status = User::STATUS_REGISTERED
194 user.status = User::STATUS_REGISTERED
195
195
196 case Setting.self_registration
196 case Setting.self_registration
197 when '1'
197 when '1'
198 register_by_email_activation(user) do
198 register_by_email_activation(user) do
199 onthefly_creation_failed(user, {:login => user.login, :identity_url => identity_url })
199 onthefly_creation_failed(user, {:login => user.login, :identity_url => identity_url })
200 end
200 end
201 when '3'
201 when '3'
202 register_automatically(user) do
202 register_automatically(user) do
203 onthefly_creation_failed(user, {:login => user.login, :identity_url => identity_url })
203 onthefly_creation_failed(user, {:login => user.login, :identity_url => identity_url })
204 end
204 end
205 else
205 else
206 register_manually_by_administrator(user) do
206 register_manually_by_administrator(user) do
207 onthefly_creation_failed(user, {:login => user.login, :identity_url => identity_url })
207 onthefly_creation_failed(user, {:login => user.login, :identity_url => identity_url })
208 end
208 end
209 end
209 end
210 else
210 else
211 # Existing record
211 # Existing record
212 successful_authentication(user)
212 successful_authentication(user)
213 end
213 end
214 end
214 end
215 end
215 end
216 end
216 end
217
217
218 def successful_authentication(user)
218 def successful_authentication(user)
219 # Valid user
219 # Valid user
220 self.logged_user = user
220 self.logged_user = user
221 # generate a key and set cookie if autologin
221 # generate a key and set cookie if autologin
222 if params[:autologin] && Setting.autologin?
222 if params[:autologin] && Setting.autologin?
223 token = Token.create(:user => user, :action => 'autologin')
223 token = Token.create(:user => user, :action => 'autologin')
224 cookies[:autologin] = { :value => token.value, :expires => 1.year.from_now }
224 cookies[:autologin] = { :value => token.value, :expires => 1.year.from_now }
225 end
225 end
226 redirect_back_or_default :controller => 'my', :action => 'page'
226 redirect_back_or_default :controller => 'my', :action => 'page'
227 end
227 end
228
228
229 # Onthefly creation failed, display the registration form to fill/fix attributes
229 # Onthefly creation failed, display the registration form to fill/fix attributes
230 def onthefly_creation_failed(user, auth_source_options = { })
230 def onthefly_creation_failed(user, auth_source_options = { })
231 @user = user
231 @user = user
232 session[:auth_source_registration] = auth_source_options unless auth_source_options.empty?
232 session[:auth_source_registration] = auth_source_options unless auth_source_options.empty?
233 render :action => 'register'
233 render :action => 'register'
234 end
234 end
235
235
236 # Register a user for email activation.
236 # Register a user for email activation.
237 #
237 #
238 # Pass a block for behavior when a user fails to save
238 # Pass a block for behavior when a user fails to save
239 def register_by_email_activation(user, &block)
239 def register_by_email_activation(user, &block)
240 token = Token.new(:user => user, :action => "register")
240 token = Token.new(:user => user, :action => "register")
241 if user.save and token.save
241 if user.save and token.save
242 Mailer.deliver_register(token)
242 Mailer.deliver_register(token)
243 flash[:notice] = l(:notice_account_register_done)
243 flash[:notice] = l(:notice_account_register_done)
244 redirect_to :action => 'login'
244 redirect_to :action => 'login'
245 else
245 else
246 yield if block_given?
246 yield if block_given?
247 end
247 end
248 end
248 end
249
249
250 # Automatically register a user
250 # Automatically register a user
251 #
251 #
252 # Pass a block for behavior when a user fails to save
252 # Pass a block for behavior when a user fails to save
253 def register_automatically(user, &block)
253 def register_automatically(user, &block)
254 # Automatic activation
254 # Automatic activation
255 user.status = User::STATUS_ACTIVE
255 user.status = User::STATUS_ACTIVE
256 if user.save
256 if user.save
257 self.logged_user = user
257 self.logged_user = user
258 flash[:notice] = l(:notice_account_activated)
258 flash[:notice] = l(:notice_account_activated)
259 redirect_to :controller => 'my', :action => 'account'
259 redirect_to :controller => 'my', :action => 'account'
260 else
260 else
261 yield if block_given?
261 yield if block_given?
262 end
262 end
263 end
263 end
264
264
265 # Manual activation by the administrator
265 # Manual activation by the administrator
266 #
266 #
267 # Pass a block for behavior when a user fails to save
267 # Pass a block for behavior when a user fails to save
268 def register_manually_by_administrator(user, &block)
268 def register_manually_by_administrator(user, &block)
269 if user.save
269 if user.save
270 # Sends an email to the administrators
270 # Sends an email to the administrators
271 Mailer.deliver_account_activation_request(user)
271 Mailer.deliver_account_activation_request(user)
272 flash[:notice] = l(:notice_account_pending)
272 flash[:notice] = l(:notice_account_pending)
273 redirect_to :action => 'login'
273 redirect_to :action => 'login'
274 else
274 else
275 yield if block_given?
275 yield if block_given?
276 end
276 end
277 end
277 end
278 end
278 end
@@ -1,38 +1,40
1 <div id="login-form">
1 <div id="login-form">
2 <% form_tag({:action=> "login"}) do %>
2 <% form_tag({:action=> "login"}) do %>
3 <%= back_url_hidden_field_tag %>
3 <%= back_url_hidden_field_tag %>
4 <table>
4 <table>
5 <tr>
5 <tr>
6 <td align="right"><label for="username"><%=l(:field_login)%>:</label></td>
6 <td align="right"><label for="username"><%=l(:field_login)%>:</label></td>
7 <td align="left"><p><%= text_field_tag 'username', nil, :size => 40 %></p></td>
7 <td align="left"><p><%= text_field_tag 'username', nil, :size => 40 %></p></td>
8 </tr>
8 </tr>
9 <tr>
9 <tr>
10 <td align="right"><label for="password"><%=l(:field_password)%>:</label></td>
10 <td align="right"><label for="password"><%=l(:field_password)%>:</label></td>
11 <td align="left"><%= password_field_tag 'password', nil, :size => 40 %></td>
11 <td align="left"><%= password_field_tag 'password', nil, :size => 40 %></td>
12 </tr>
12 </tr>
13 <% if Setting.openid? %>
13 <tr>
14 <tr>
14 <td align="right"><label for="openid_url"><%=l(:field_identity_url)%></label></td>
15 <td align="right"><label for="openid_url"><%=l(:field_identity_url)%></label></td>
15 <td align="left"><%= text_field_tag "openid_url" %></td>
16 <td align="left"><%= text_field_tag "openid_url" %></td>
16 </tr>
17 </tr>
18 <% end %>
17 <tr>
19 <tr>
18 <td></td>
20 <td></td>
19 <td align="left">
21 <td align="left">
20 <% if Setting.autologin? %>
22 <% if Setting.autologin? %>
21 <label for="autologin"><%= check_box_tag 'autologin' %> <%= l(:label_stay_logged_in) %></label>
23 <label for="autologin"><%= check_box_tag 'autologin' %> <%= l(:label_stay_logged_in) %></label>
22 <% end %>
24 <% end %>
23 </td>
25 </td>
24 </tr>
26 </tr>
25 <tr>
27 <tr>
26 <td align="left">
28 <td align="left">
27 <% if Setting.lost_password? %>
29 <% if Setting.lost_password? %>
28 <%= link_to l(:label_password_lost), :controller => 'account', :action => 'lost_password' %>
30 <%= link_to l(:label_password_lost), :controller => 'account', :action => 'lost_password' %>
29 <% end %>
31 <% end %>
30 </td>
32 </td>
31 <td align="right">
33 <td align="right">
32 <input type="submit" name="login" value="<%=l(:button_login)%> &#187;" />
34 <input type="submit" name="login" value="<%=l(:button_login)%> &#187;" />
33 </td>
35 </td>
34 </tr>
36 </tr>
35 </table>
37 </table>
36 <%= javascript_tag "Form.Element.focus('username');" %>
38 <%= javascript_tag "Form.Element.focus('username');" %>
37 <% end %>
39 <% end %>
38 </div>
40 </div>
@@ -1,42 +1,44
1 <h2><%=l(:label_register)%> <%=link_to l(:label_login_with_open_id_option), signin_url %></h2>
1 <h2><%=l(:label_register)%><%=link_to l(:label_login_with_open_id_option), signin_url if Setting.openid? %></h2>
2
2
3 <% form_tag({:action => 'register'}, :class => "tabular") do %>
3 <% form_tag({:action => 'register'}, :class => "tabular") do %>
4 <%= error_messages_for 'user' %>
4 <%= error_messages_for 'user' %>
5
5
6 <div class="box">
6 <div class="box">
7 <!--[form:user]-->
7 <!--[form:user]-->
8 <% if @user.auth_source_id.nil? %>
8 <% if @user.auth_source_id.nil? %>
9 <p><label for="user_login"><%=l(:field_login)%> <span class="required">*</span></label>
9 <p><label for="user_login"><%=l(:field_login)%> <span class="required">*</span></label>
10 <%= text_field 'user', 'login', :size => 25 %></p>
10 <%= text_field 'user', 'login', :size => 25 %></p>
11
11
12 <p><label for="password"><%=l(:field_password)%> <span class="required">*</span></label>
12 <p><label for="password"><%=l(:field_password)%> <span class="required">*</span></label>
13 <%= password_field_tag 'password', nil, :size => 25 %><br />
13 <%= password_field_tag 'password', nil, :size => 25 %><br />
14 <em><%= l(:text_caracters_minimum, 4) %></em></p>
14 <em><%= l(:text_caracters_minimum, 4) %></em></p>
15
15
16 <p><label for="password_confirmation"><%=l(:field_password_confirmation)%> <span class="required">*</span></label>
16 <p><label for="password_confirmation"><%=l(:field_password_confirmation)%> <span class="required">*</span></label>
17 <%= password_field_tag 'password_confirmation', nil, :size => 25 %></p>
17 <%= password_field_tag 'password_confirmation', nil, :size => 25 %></p>
18 <% end %>
18 <% end %>
19
19
20 <p><label for="user_firstname"><%=l(:field_firstname)%> <span class="required">*</span></label>
20 <p><label for="user_firstname"><%=l(:field_firstname)%> <span class="required">*</span></label>
21 <%= text_field 'user', 'firstname' %></p>
21 <%= text_field 'user', 'firstname' %></p>
22
22
23 <p><label for="user_lastname"><%=l(:field_lastname)%> <span class="required">*</span></label>
23 <p><label for="user_lastname"><%=l(:field_lastname)%> <span class="required">*</span></label>
24 <%= text_field 'user', 'lastname' %></p>
24 <%= text_field 'user', 'lastname' %></p>
25
25
26 <p><label for="user_mail"><%=l(:field_mail)%> <span class="required">*</span></label>
26 <p><label for="user_mail"><%=l(:field_mail)%> <span class="required">*</span></label>
27 <%= text_field 'user', 'mail' %></p>
27 <%= text_field 'user', 'mail' %></p>
28
28
29 <p><label for="user_language"><%=l(:field_language)%></label>
29 <p><label for="user_language"><%=l(:field_language)%></label>
30 <%= select("user", "language", lang_options_for_select) %></p>
30 <%= select("user", "language", lang_options_for_select) %></p>
31
31
32 <% if Setting.openid? %>
32 <p><label for="user_identity_url"><%=l(:field_identity_url)%></label>
33 <p><label for="user_identity_url"><%=l(:field_identity_url)%></label>
33 <%= text_field 'user', 'identity_url' %></p>
34 <%= text_field 'user', 'identity_url' %></p>
35 <% end %>
34
36
35 <% @user.custom_field_values.select {|v| v.editable? || v.required?}.each do |value| %>
37 <% @user.custom_field_values.select {|v| v.editable? || v.required?}.each do |value| %>
36 <p><%= custom_field_tag_with_label :user, value %></p>
38 <p><%= custom_field_tag_with_label :user, value %></p>
37 <% end %>
39 <% end %>
38 <!--[eoform:user]-->
40 <!--[eoform:user]-->
39 </div>
41 </div>
40
42
41 <%= submit_tag l(:button_submit) %>
43 <%= submit_tag l(:button_submit) %>
42 <% end %>
44 <% end %>
@@ -1,27 +1,30
1 <% form_tag({:action => 'edit', :tab => 'authentication'}) do %>
1 <% form_tag({:action => 'edit', :tab => 'authentication'}) do %>
2
2
3 <div class="box tabular settings">
3 <div class="box tabular settings">
4 <p><label><%= l(:setting_login_required) %></label>
4 <p><label><%= l(:setting_login_required) %></label>
5 <%= check_box_tag 'settings[login_required]', 1, Setting.login_required? %><%= hidden_field_tag 'settings[login_required]', 0 %></p>
5 <%= check_box_tag 'settings[login_required]', 1, Setting.login_required? %><%= hidden_field_tag 'settings[login_required]', 0 %></p>
6
6
7 <p><label><%= l(:setting_autologin) %></label>
7 <p><label><%= l(:setting_autologin) %></label>
8 <%= select_tag 'settings[autologin]', options_for_select( [[l(:label_disabled), "0"]] + [1, 7, 30, 365].collect{|days| [lwr(:actionview_datehelper_time_in_words_day, days), days.to_s]}, Setting.autologin) %></p>
8 <%= select_tag 'settings[autologin]', options_for_select( [[l(:label_disabled), "0"]] + [1, 7, 30, 365].collect{|days| [lwr(:actionview_datehelper_time_in_words_day, days), days.to_s]}, Setting.autologin) %></p>
9
9
10 <p><label><%= l(:setting_self_registration) %></label>
10 <p><label><%= l(:setting_self_registration) %></label>
11 <%= select_tag 'settings[self_registration]',
11 <%= select_tag 'settings[self_registration]',
12 options_for_select( [[l(:label_disabled), "0"],
12 options_for_select( [[l(:label_disabled), "0"],
13 [l(:label_registration_activation_by_email), "1"],
13 [l(:label_registration_activation_by_email), "1"],
14 [l(:label_registration_manual_activation), "2"],
14 [l(:label_registration_manual_activation), "2"],
15 [l(:label_registration_automatic_activation), "3"]
15 [l(:label_registration_automatic_activation), "3"]
16 ], Setting.self_registration ) %></p>
16 ], Setting.self_registration ) %></p>
17
17
18 <p><label><%= l(:label_password_lost) %></label>
18 <p><label><%= l(:label_password_lost) %></label>
19 <%= check_box_tag 'settings[lost_password]', 1, Setting.lost_password? %><%= hidden_field_tag 'settings[lost_password]', 0 %></p>
19 <%= check_box_tag 'settings[lost_password]', 1, Setting.lost_password? %><%= hidden_field_tag 'settings[lost_password]', 0 %></p>
20
21 <p><label><%= l(:setting_openid) %></label>
22 <%= check_box_tag 'settings[openid]', 1, Setting.openid? %><%= hidden_field_tag 'settings[openid]', 0 %></p>
20 </div>
23 </div>
21
24
22 <div style="float:right;">
25 <div style="float:right;">
23 <%= link_to l(:label_ldap_authentication), :controller => 'auth_sources', :action => 'list' %>
26 <%= link_to l(:label_ldap_authentication), :controller => 'auth_sources', :action => 'list' %>
24 </div>
27 </div>
25
28
26 <%= submit_tag l(:button_save) %>
29 <%= submit_tag l(:button_save) %>
27 <% end %>
30 <% end %>
@@ -1,32 +1,34
1 <%= error_messages_for 'user' %>
1 <%= error_messages_for 'user' %>
2
2
3 <!--[form:user]-->
3 <!--[form:user]-->
4 <div class="box">
4 <div class="box">
5 <p><%= f.text_field :login, :required => true, :size => 25 %></p>
5 <p><%= f.text_field :login, :required => true, :size => 25 %></p>
6 <p><%= f.text_field :firstname, :required => true %></p>
6 <p><%= f.text_field :firstname, :required => true %></p>
7 <p><%= f.text_field :lastname, :required => true %></p>
7 <p><%= f.text_field :lastname, :required => true %></p>
8 <p><%= f.text_field :mail, :required => true %></p>
8 <p><%= f.text_field :mail, :required => true %></p>
9 <p><%= f.select :language, lang_options_for_select %></p>
9 <p><%= f.select :language, lang_options_for_select %></p>
10 <% if Setting.openid? %>
10 <p><%= f.text_field :identity_url %></p>
11 <p><%= f.text_field :identity_url %></p>
12 <% end %>
11
13
12 <% @user.custom_field_values.each do |value| %>
14 <% @user.custom_field_values.each do |value| %>
13 <p><%= custom_field_tag_with_label :user, value %></p>
15 <p><%= custom_field_tag_with_label :user, value %></p>
14 <% end %>
16 <% end %>
15
17
16 <p><%= f.check_box :admin, :disabled => (@user == User.current) %></p>
18 <p><%= f.check_box :admin, :disabled => (@user == User.current) %></p>
17 </div>
19 </div>
18
20
19 <div class="box">
21 <div class="box">
20 <h3><%=l(:label_authentication)%></h3>
22 <h3><%=l(:label_authentication)%></h3>
21 <% unless @auth_sources.empty? %>
23 <% unless @auth_sources.empty? %>
22 <p><%= f.select :auth_source_id, ([[l(:label_internal), ""]] + @auth_sources.collect { |a| [a.name, a.id] }), {}, :onchange => "if (this.value=='') {Element.show('password_fields');} else {Element.hide('password_fields');}" %></p>
24 <p><%= f.select :auth_source_id, ([[l(:label_internal), ""]] + @auth_sources.collect { |a| [a.name, a.id] }), {}, :onchange => "if (this.value=='') {Element.show('password_fields');} else {Element.hide('password_fields');}" %></p>
23 <% end %>
25 <% end %>
24 <div id="password_fields" style="<%= 'display:none;' if @user.auth_source %>">
26 <div id="password_fields" style="<%= 'display:none;' if @user.auth_source %>">
25 <p><label for="password"><%=l(:field_password)%><span class="required"> *</span></label>
27 <p><label for="password"><%=l(:field_password)%><span class="required"> *</span></label>
26 <%= password_field_tag 'password', nil, :size => 25 %><br />
28 <%= password_field_tag 'password', nil, :size => 25 %><br />
27 <em><%= l(:text_caracters_minimum, 4) %></em></p>
29 <em><%= l(:text_caracters_minimum, 4) %></em></p>
28 <p><label for="password_confirmation"><%=l(:field_password_confirmation)%><span class="required"> *</span></label>
30 <p><label for="password_confirmation"><%=l(:field_password_confirmation)%><span class="required"> *</span></label>
29 <%= password_field_tag 'password_confirmation', nil, :size => 25 %></p>
31 <%= password_field_tag 'password_confirmation', nil, :size => 25 %></p>
30 </div>
32 </div>
31 </div>
33 </div>
32 <!--[eoform:user]-->
34 <!--[eoform:user]-->
@@ -1,145 +1,147
1 # redMine - project management software
1 # redMine - project management software
2 # Copyright (C) 2006-2007 Jean-Philippe Lang
2 # Copyright (C) 2006-2007 Jean-Philippe Lang
3 #
3 #
4 # This program is free software; you can redistribute it and/or
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
7 # of the License, or (at your option) any later version.
8 #
8 #
9 # This program is distributed in the hope that it will be useful,
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
12 # GNU General Public License for more details.
13 #
13 #
14 # You should have received a copy of the GNU General Public License
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
17
18
18
19 # DO NOT MODIFY THIS FILE !!!
19 # DO NOT MODIFY THIS FILE !!!
20 # Settings can be defined through the application in Admin -> Settings
20 # Settings can be defined through the application in Admin -> Settings
21
21
22 app_title:
22 app_title:
23 default: Redmine
23 default: Redmine
24 app_subtitle:
24 app_subtitle:
25 default: Project management
25 default: Project management
26 welcome_text:
26 welcome_text:
27 default:
27 default:
28 login_required:
28 login_required:
29 default: 0
29 default: 0
30 self_registration:
30 self_registration:
31 default: '2'
31 default: '2'
32 lost_password:
32 lost_password:
33 default: 1
33 default: 1
34 attachment_max_size:
34 attachment_max_size:
35 format: int
35 format: int
36 default: 5120
36 default: 5120
37 issues_export_limit:
37 issues_export_limit:
38 format: int
38 format: int
39 default: 500
39 default: 500
40 activity_days_default:
40 activity_days_default:
41 format: int
41 format: int
42 default: 30
42 default: 30
43 per_page_options:
43 per_page_options:
44 default: '25,50,100'
44 default: '25,50,100'
45 mail_from:
45 mail_from:
46 default: redmine@example.net
46 default: redmine@example.net
47 bcc_recipients:
47 bcc_recipients:
48 default: 1
48 default: 1
49 plain_text_mail:
49 plain_text_mail:
50 default: 0
50 default: 0
51 text_formatting:
51 text_formatting:
52 default: textile
52 default: textile
53 wiki_compression:
53 wiki_compression:
54 default: ""
54 default: ""
55 default_language:
55 default_language:
56 default: en
56 default: en
57 host_name:
57 host_name:
58 default: localhost:3000
58 default: localhost:3000
59 protocol:
59 protocol:
60 default: http
60 default: http
61 feeds_limit:
61 feeds_limit:
62 format: int
62 format: int
63 default: 15
63 default: 15
64 diff_max_lines_displayed:
64 diff_max_lines_displayed:
65 format: int
65 format: int
66 default: 1500
66 default: 1500
67 enabled_scm:
67 enabled_scm:
68 serialized: true
68 serialized: true
69 default:
69 default:
70 - Subversion
70 - Subversion
71 - Darcs
71 - Darcs
72 - Mercurial
72 - Mercurial
73 - Cvs
73 - Cvs
74 - Bazaar
74 - Bazaar
75 - Git
75 - Git
76 autofetch_changesets:
76 autofetch_changesets:
77 default: 1
77 default: 1
78 sys_api_enabled:
78 sys_api_enabled:
79 default: 0
79 default: 0
80 commit_ref_keywords:
80 commit_ref_keywords:
81 default: 'refs,references,IssueID'
81 default: 'refs,references,IssueID'
82 commit_fix_keywords:
82 commit_fix_keywords:
83 default: 'fixes,closes'
83 default: 'fixes,closes'
84 commit_fix_status_id:
84 commit_fix_status_id:
85 format: int
85 format: int
86 default: 0
86 default: 0
87 commit_fix_done_ratio:
87 commit_fix_done_ratio:
88 default: 100
88 default: 100
89 # autologin duration in days
89 # autologin duration in days
90 # 0 means autologin is disabled
90 # 0 means autologin is disabled
91 autologin:
91 autologin:
92 format: int
92 format: int
93 default: 0
93 default: 0
94 # date format
94 # date format
95 date_format:
95 date_format:
96 default: ''
96 default: ''
97 time_format:
97 time_format:
98 default: ''
98 default: ''
99 user_format:
99 user_format:
100 default: :firstname_lastname
100 default: :firstname_lastname
101 format: symbol
101 format: symbol
102 cross_project_issue_relations:
102 cross_project_issue_relations:
103 default: 0
103 default: 0
104 notified_events:
104 notified_events:
105 serialized: true
105 serialized: true
106 default:
106 default:
107 - issue_added
107 - issue_added
108 - issue_updated
108 - issue_updated
109 mail_handler_api_enabled:
109 mail_handler_api_enabled:
110 default: 0
110 default: 0
111 mail_handler_api_key:
111 mail_handler_api_key:
112 default:
112 default:
113 issue_list_default_columns:
113 issue_list_default_columns:
114 serialized: true
114 serialized: true
115 default:
115 default:
116 - tracker
116 - tracker
117 - status
117 - status
118 - priority
118 - priority
119 - subject
119 - subject
120 - assigned_to
120 - assigned_to
121 - updated_on
121 - updated_on
122 display_subprojects_issues:
122 display_subprojects_issues:
123 default: 1
123 default: 1
124 default_projects_public:
124 default_projects_public:
125 default: 1
125 default: 1
126 sequential_project_identifiers:
126 sequential_project_identifiers:
127 default: 0
127 default: 0
128 # encodings used to convert repository files content to UTF-8
128 # encodings used to convert repository files content to UTF-8
129 # multiple values accepted, comma separated
129 # multiple values accepted, comma separated
130 repositories_encodings:
130 repositories_encodings:
131 default: ''
131 default: ''
132 # encoding used to convert commit logs to UTF-8
132 # encoding used to convert commit logs to UTF-8
133 commit_logs_encoding:
133 commit_logs_encoding:
134 default: 'UTF-8'
134 default: 'UTF-8'
135 repository_log_display_limit:
135 repository_log_display_limit:
136 format: int
136 format: int
137 default: 100
137 default: 100
138 ui_theme:
138 ui_theme:
139 default: ''
139 default: ''
140 emails_footer:
140 emails_footer:
141 default: |-
141 default: |-
142 You have received this notification because you have either subscribed to it, or are involved in it.
142 You have received this notification because you have either subscribed to it, or are involved in it.
143 To change your notification preferences, please click here: http://hostname/my/account
143 To change your notification preferences, please click here: http://hostname/my/account
144 gravatar_enabled:
144 gravatar_enabled:
145 default: 0
145 default: 0
146 openid:
147 default: 0
@@ -1,710 +1,711
1 _gloc_rule_default: '|n| n==1 ? "" : "_plural" '
1 _gloc_rule_default: '|n| n==1 ? "" : "_plural" '
2
2
3 actionview_datehelper_select_day_prefix:
3 actionview_datehelper_select_day_prefix:
4 actionview_datehelper_select_month_names: January,February,March,April,May,June,July,August,September,October,November,December
4 actionview_datehelper_select_month_names: January,February,March,April,May,June,July,August,September,October,November,December
5 actionview_datehelper_select_month_names_abbr: Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec
5 actionview_datehelper_select_month_names_abbr: Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec
6 actionview_datehelper_select_month_prefix:
6 actionview_datehelper_select_month_prefix:
7 actionview_datehelper_select_year_prefix:
7 actionview_datehelper_select_year_prefix:
8 actionview_datehelper_time_in_words_day: 1 day
8 actionview_datehelper_time_in_words_day: 1 day
9 actionview_datehelper_time_in_words_day_plural: %d days
9 actionview_datehelper_time_in_words_day_plural: %d days
10 actionview_datehelper_time_in_words_hour_about: about an hour
10 actionview_datehelper_time_in_words_hour_about: about an hour
11 actionview_datehelper_time_in_words_hour_about_plural: about %d hours
11 actionview_datehelper_time_in_words_hour_about_plural: about %d hours
12 actionview_datehelper_time_in_words_hour_about_single: about an hour
12 actionview_datehelper_time_in_words_hour_about_single: about an hour
13 actionview_datehelper_time_in_words_minute: 1 minute
13 actionview_datehelper_time_in_words_minute: 1 minute
14 actionview_datehelper_time_in_words_minute_half: half a minute
14 actionview_datehelper_time_in_words_minute_half: half a minute
15 actionview_datehelper_time_in_words_minute_less_than: less than a minute
15 actionview_datehelper_time_in_words_minute_less_than: less than a minute
16 actionview_datehelper_time_in_words_minute_plural: %d minutes
16 actionview_datehelper_time_in_words_minute_plural: %d minutes
17 actionview_datehelper_time_in_words_minute_single: 1 minute
17 actionview_datehelper_time_in_words_minute_single: 1 minute
18 actionview_datehelper_time_in_words_second_less_than: less than a second
18 actionview_datehelper_time_in_words_second_less_than: less than a second
19 actionview_datehelper_time_in_words_second_less_than_plural: less than %d seconds
19 actionview_datehelper_time_in_words_second_less_than_plural: less than %d seconds
20 actionview_instancetag_blank_option: Please select
20 actionview_instancetag_blank_option: Please select
21
21
22 activerecord_error_inclusion: is not included in the list
22 activerecord_error_inclusion: is not included in the list
23 activerecord_error_exclusion: is reserved
23 activerecord_error_exclusion: is reserved
24 activerecord_error_invalid: is invalid
24 activerecord_error_invalid: is invalid
25 activerecord_error_confirmation: doesn't match confirmation
25 activerecord_error_confirmation: doesn't match confirmation
26 activerecord_error_accepted: must be accepted
26 activerecord_error_accepted: must be accepted
27 activerecord_error_empty: can't be empty
27 activerecord_error_empty: can't be empty
28 activerecord_error_blank: can't be blank
28 activerecord_error_blank: can't be blank
29 activerecord_error_too_long: is too long
29 activerecord_error_too_long: is too long
30 activerecord_error_too_short: is too short
30 activerecord_error_too_short: is too short
31 activerecord_error_wrong_length: is the wrong length
31 activerecord_error_wrong_length: is the wrong length
32 activerecord_error_taken: has already been taken
32 activerecord_error_taken: has already been taken
33 activerecord_error_not_a_number: is not a number
33 activerecord_error_not_a_number: is not a number
34 activerecord_error_not_a_date: is not a valid date
34 activerecord_error_not_a_date: is not a valid date
35 activerecord_error_greater_than_start_date: must be greater than start date
35 activerecord_error_greater_than_start_date: must be greater than start date
36 activerecord_error_not_same_project: doesn't belong to the same project
36 activerecord_error_not_same_project: doesn't belong to the same project
37 activerecord_error_circular_dependency: This relation would create a circular dependency
37 activerecord_error_circular_dependency: This relation would create a circular dependency
38
38
39 general_fmt_age: %d yr
39 general_fmt_age: %d yr
40 general_fmt_age_plural: %d yrs
40 general_fmt_age_plural: %d yrs
41 general_fmt_date: %%m/%%d/%%Y
41 general_fmt_date: %%m/%%d/%%Y
42 general_fmt_datetime: %%m/%%d/%%Y %%I:%%M %%p
42 general_fmt_datetime: %%m/%%d/%%Y %%I:%%M %%p
43 general_fmt_datetime_short: %%b %%d, %%I:%%M %%p
43 general_fmt_datetime_short: %%b %%d, %%I:%%M %%p
44 general_fmt_time: %%I:%%M %%p
44 general_fmt_time: %%I:%%M %%p
45 general_text_No: 'No'
45 general_text_No: 'No'
46 general_text_Yes: 'Yes'
46 general_text_Yes: 'Yes'
47 general_text_no: 'no'
47 general_text_no: 'no'
48 general_text_yes: 'yes'
48 general_text_yes: 'yes'
49 general_lang_name: 'English'
49 general_lang_name: 'English'
50 general_csv_separator: ','
50 general_csv_separator: ','
51 general_csv_decimal_separator: '.'
51 general_csv_decimal_separator: '.'
52 general_csv_encoding: ISO-8859-1
52 general_csv_encoding: ISO-8859-1
53 general_pdf_encoding: ISO-8859-1
53 general_pdf_encoding: ISO-8859-1
54 general_day_names: Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday
54 general_day_names: Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday
55 general_first_day_of_week: '7'
55 general_first_day_of_week: '7'
56
56
57 notice_account_updated: Account was successfully updated.
57 notice_account_updated: Account was successfully updated.
58 notice_account_invalid_creditentials: Invalid user or password
58 notice_account_invalid_creditentials: Invalid user or password
59 notice_account_password_updated: Password was successfully updated.
59 notice_account_password_updated: Password was successfully updated.
60 notice_account_wrong_password: Wrong password
60 notice_account_wrong_password: Wrong password
61 notice_account_register_done: Account was successfully created. To activate your account, click on the link that was emailed to you.
61 notice_account_register_done: Account was successfully created. To activate your account, click on the link that was emailed to you.
62 notice_account_unknown_email: Unknown user.
62 notice_account_unknown_email: Unknown user.
63 notice_can_t_change_password: This account uses an external authentication source. Impossible to change the password.
63 notice_can_t_change_password: This account uses an external authentication source. Impossible to change the password.
64 notice_account_lost_email_sent: An email with instructions to choose a new password has been sent to you.
64 notice_account_lost_email_sent: An email with instructions to choose a new password has been sent to you.
65 notice_account_activated: Your account has been activated. You can now log in.
65 notice_account_activated: Your account has been activated. You can now log in.
66 notice_successful_create: Successful creation.
66 notice_successful_create: Successful creation.
67 notice_successful_update: Successful update.
67 notice_successful_update: Successful update.
68 notice_successful_delete: Successful deletion.
68 notice_successful_delete: Successful deletion.
69 notice_successful_connection: Successful connection.
69 notice_successful_connection: Successful connection.
70 notice_file_not_found: The page you were trying to access doesn't exist or has been removed.
70 notice_file_not_found: The page you were trying to access doesn't exist or has been removed.
71 notice_locking_conflict: Data has been updated by another user.
71 notice_locking_conflict: Data has been updated by another user.
72 notice_not_authorized: You are not authorized to access this page.
72 notice_not_authorized: You are not authorized to access this page.
73 notice_email_sent: An email was sent to %s
73 notice_email_sent: An email was sent to %s
74 notice_email_error: An error occurred while sending mail (%s)
74 notice_email_error: An error occurred while sending mail (%s)
75 notice_feeds_access_key_reseted: Your RSS access key was reset.
75 notice_feeds_access_key_reseted: Your RSS access key was reset.
76 notice_failed_to_save_issues: "Failed to save %d issue(s) on %d selected: %s."
76 notice_failed_to_save_issues: "Failed to save %d issue(s) on %d selected: %s."
77 notice_no_issue_selected: "No issue is selected! Please, check the issues you want to edit."
77 notice_no_issue_selected: "No issue is selected! Please, check the issues you want to edit."
78 notice_account_pending: "Your account was created and is now pending administrator approval."
78 notice_account_pending: "Your account was created and is now pending administrator approval."
79 notice_default_data_loaded: Default configuration successfully loaded.
79 notice_default_data_loaded: Default configuration successfully loaded.
80 notice_unable_delete_version: Unable to delete version.
80 notice_unable_delete_version: Unable to delete version.
81
81
82 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
82 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
83 error_scm_not_found: "The entry or revision was not found in the repository."
83 error_scm_not_found: "The entry or revision was not found in the repository."
84 error_scm_command_failed: "An error occurred when trying to access the repository: %s"
84 error_scm_command_failed: "An error occurred when trying to access the repository: %s"
85 error_scm_annotate: "The entry does not exist or can not be annotated."
85 error_scm_annotate: "The entry does not exist or can not be annotated."
86 error_issue_not_found_in_project: 'The issue was not found or does not belong to this project'
86 error_issue_not_found_in_project: 'The issue was not found or does not belong to this project'
87
87
88 warning_attachments_not_saved: "%d file(s) could not be saved."
88 warning_attachments_not_saved: "%d file(s) could not be saved."
89
89
90 mail_subject_lost_password: Your %s password
90 mail_subject_lost_password: Your %s password
91 mail_body_lost_password: 'To change your password, click on the following link:'
91 mail_body_lost_password: 'To change your password, click on the following link:'
92 mail_subject_register: Your %s account activation
92 mail_subject_register: Your %s account activation
93 mail_body_register: 'To activate your account, click on the following link:'
93 mail_body_register: 'To activate your account, click on the following link:'
94 mail_body_account_information_external: You can use your "%s" account to log in.
94 mail_body_account_information_external: You can use your "%s" account to log in.
95 mail_body_account_information: Your account information
95 mail_body_account_information: Your account information
96 mail_subject_account_activation_request: %s account activation request
96 mail_subject_account_activation_request: %s account activation request
97 mail_body_account_activation_request: 'A new user (%s) has registered. The account is pending your approval:'
97 mail_body_account_activation_request: 'A new user (%s) has registered. The account is pending your approval:'
98 mail_subject_reminder: "%d issue(s) due in the next days"
98 mail_subject_reminder: "%d issue(s) due in the next days"
99 mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d days:"
99 mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d days:"
100
100
101 gui_validation_error: 1 error
101 gui_validation_error: 1 error
102 gui_validation_error_plural: %d errors
102 gui_validation_error_plural: %d errors
103
103
104 field_name: Name
104 field_name: Name
105 field_description: Description
105 field_description: Description
106 field_summary: Summary
106 field_summary: Summary
107 field_is_required: Required
107 field_is_required: Required
108 field_firstname: Firstname
108 field_firstname: Firstname
109 field_lastname: Lastname
109 field_lastname: Lastname
110 field_mail: Email
110 field_mail: Email
111 field_filename: File
111 field_filename: File
112 field_filesize: Size
112 field_filesize: Size
113 field_downloads: Downloads
113 field_downloads: Downloads
114 field_author: Author
114 field_author: Author
115 field_created_on: Created
115 field_created_on: Created
116 field_updated_on: Updated
116 field_updated_on: Updated
117 field_field_format: Format
117 field_field_format: Format
118 field_is_for_all: For all projects
118 field_is_for_all: For all projects
119 field_possible_values: Possible values
119 field_possible_values: Possible values
120 field_regexp: Regular expression
120 field_regexp: Regular expression
121 field_min_length: Minimum length
121 field_min_length: Minimum length
122 field_max_length: Maximum length
122 field_max_length: Maximum length
123 field_value: Value
123 field_value: Value
124 field_category: Category
124 field_category: Category
125 field_title: Title
125 field_title: Title
126 field_project: Project
126 field_project: Project
127 field_issue: Issue
127 field_issue: Issue
128 field_status: Status
128 field_status: Status
129 field_notes: Notes
129 field_notes: Notes
130 field_is_closed: Issue closed
130 field_is_closed: Issue closed
131 field_is_default: Default value
131 field_is_default: Default value
132 field_tracker: Tracker
132 field_tracker: Tracker
133 field_subject: Subject
133 field_subject: Subject
134 field_due_date: Due date
134 field_due_date: Due date
135 field_assigned_to: Assigned to
135 field_assigned_to: Assigned to
136 field_priority: Priority
136 field_priority: Priority
137 field_fixed_version: Target version
137 field_fixed_version: Target version
138 field_user: User
138 field_user: User
139 field_role: Role
139 field_role: Role
140 field_homepage: Homepage
140 field_homepage: Homepage
141 field_is_public: Public
141 field_is_public: Public
142 field_parent: Subproject of
142 field_parent: Subproject of
143 field_is_in_chlog: Issues displayed in changelog
143 field_is_in_chlog: Issues displayed in changelog
144 field_is_in_roadmap: Issues displayed in roadmap
144 field_is_in_roadmap: Issues displayed in roadmap
145 field_login: Login
145 field_login: Login
146 field_mail_notification: Email notifications
146 field_mail_notification: Email notifications
147 field_admin: Administrator
147 field_admin: Administrator
148 field_last_login_on: Last connection
148 field_last_login_on: Last connection
149 field_language: Language
149 field_language: Language
150 field_identity_url: OpenID URL
150 field_identity_url: OpenID URL
151 field_effective_date: Date
151 field_effective_date: Date
152 field_password: Password
152 field_password: Password
153 field_new_password: New password
153 field_new_password: New password
154 field_password_confirmation: Confirmation
154 field_password_confirmation: Confirmation
155 field_version: Version
155 field_version: Version
156 field_type: Type
156 field_type: Type
157 field_host: Host
157 field_host: Host
158 field_port: Port
158 field_port: Port
159 field_account: Account
159 field_account: Account
160 field_base_dn: Base DN
160 field_base_dn: Base DN
161 field_attr_login: Login attribute
161 field_attr_login: Login attribute
162 field_attr_firstname: Firstname attribute
162 field_attr_firstname: Firstname attribute
163 field_attr_lastname: Lastname attribute
163 field_attr_lastname: Lastname attribute
164 field_attr_mail: Email attribute
164 field_attr_mail: Email attribute
165 field_onthefly: On-the-fly user creation
165 field_onthefly: On-the-fly user creation
166 field_start_date: Start
166 field_start_date: Start
167 field_done_ratio: %% Done
167 field_done_ratio: %% Done
168 field_auth_source: Authentication mode
168 field_auth_source: Authentication mode
169 field_hide_mail: Hide my email address
169 field_hide_mail: Hide my email address
170 field_comments: Comment
170 field_comments: Comment
171 field_url: URL
171 field_url: URL
172 field_start_page: Start page
172 field_start_page: Start page
173 field_subproject: Subproject
173 field_subproject: Subproject
174 field_hours: Hours
174 field_hours: Hours
175 field_activity: Activity
175 field_activity: Activity
176 field_spent_on: Date
176 field_spent_on: Date
177 field_identifier: Identifier
177 field_identifier: Identifier
178 field_is_filter: Used as a filter
178 field_is_filter: Used as a filter
179 field_issue_to_id: Related issue
179 field_issue_to_id: Related issue
180 field_delay: Delay
180 field_delay: Delay
181 field_assignable: Issues can be assigned to this role
181 field_assignable: Issues can be assigned to this role
182 field_redirect_existing_links: Redirect existing links
182 field_redirect_existing_links: Redirect existing links
183 field_estimated_hours: Estimated time
183 field_estimated_hours: Estimated time
184 field_column_names: Columns
184 field_column_names: Columns
185 field_time_zone: Time zone
185 field_time_zone: Time zone
186 field_searchable: Searchable
186 field_searchable: Searchable
187 field_default_value: Default value
187 field_default_value: Default value
188 field_comments_sorting: Display comments
188 field_comments_sorting: Display comments
189 field_parent_title: Parent page
189 field_parent_title: Parent page
190 field_editable: Editable
190 field_editable: Editable
191
191
192 setting_app_title: Application title
192 setting_app_title: Application title
193 setting_app_subtitle: Application subtitle
193 setting_app_subtitle: Application subtitle
194 setting_welcome_text: Welcome text
194 setting_welcome_text: Welcome text
195 setting_default_language: Default language
195 setting_default_language: Default language
196 setting_login_required: Authentication required
196 setting_login_required: Authentication required
197 setting_self_registration: Self-registration
197 setting_self_registration: Self-registration
198 setting_attachment_max_size: Attachment max. size
198 setting_attachment_max_size: Attachment max. size
199 setting_issues_export_limit: Issues export limit
199 setting_issues_export_limit: Issues export limit
200 setting_mail_from: Emission email address
200 setting_mail_from: Emission email address
201 setting_bcc_recipients: Blind carbon copy recipients (bcc)
201 setting_bcc_recipients: Blind carbon copy recipients (bcc)
202 setting_plain_text_mail: Plain text mail (no HTML)
202 setting_plain_text_mail: Plain text mail (no HTML)
203 setting_host_name: Host name and path
203 setting_host_name: Host name and path
204 setting_text_formatting: Text formatting
204 setting_text_formatting: Text formatting
205 setting_wiki_compression: Wiki history compression
205 setting_wiki_compression: Wiki history compression
206 setting_feeds_limit: Feed content limit
206 setting_feeds_limit: Feed content limit
207 setting_default_projects_public: New projects are public by default
207 setting_default_projects_public: New projects are public by default
208 setting_autofetch_changesets: Autofetch commits
208 setting_autofetch_changesets: Autofetch commits
209 setting_sys_api_enabled: Enable WS for repository management
209 setting_sys_api_enabled: Enable WS for repository management
210 setting_commit_ref_keywords: Referencing keywords
210 setting_commit_ref_keywords: Referencing keywords
211 setting_commit_fix_keywords: Fixing keywords
211 setting_commit_fix_keywords: Fixing keywords
212 setting_autologin: Autologin
212 setting_autologin: Autologin
213 setting_date_format: Date format
213 setting_date_format: Date format
214 setting_time_format: Time format
214 setting_time_format: Time format
215 setting_cross_project_issue_relations: Allow cross-project issue relations
215 setting_cross_project_issue_relations: Allow cross-project issue relations
216 setting_issue_list_default_columns: Default columns displayed on the issue list
216 setting_issue_list_default_columns: Default columns displayed on the issue list
217 setting_repositories_encodings: Repositories encodings
217 setting_repositories_encodings: Repositories encodings
218 setting_commit_logs_encoding: Commit messages encoding
218 setting_commit_logs_encoding: Commit messages encoding
219 setting_emails_footer: Emails footer
219 setting_emails_footer: Emails footer
220 setting_protocol: Protocol
220 setting_protocol: Protocol
221 setting_per_page_options: Objects per page options
221 setting_per_page_options: Objects per page options
222 setting_user_format: Users display format
222 setting_user_format: Users display format
223 setting_activity_days_default: Days displayed on project activity
223 setting_activity_days_default: Days displayed on project activity
224 setting_display_subprojects_issues: Display subprojects issues on main projects by default
224 setting_display_subprojects_issues: Display subprojects issues on main projects by default
225 setting_enabled_scm: Enabled SCM
225 setting_enabled_scm: Enabled SCM
226 setting_mail_handler_api_enabled: Enable WS for incoming emails
226 setting_mail_handler_api_enabled: Enable WS for incoming emails
227 setting_mail_handler_api_key: API key
227 setting_mail_handler_api_key: API key
228 setting_sequential_project_identifiers: Generate sequential project identifiers
228 setting_sequential_project_identifiers: Generate sequential project identifiers
229 setting_gravatar_enabled: Use Gravatar user icons
229 setting_gravatar_enabled: Use Gravatar user icons
230 setting_diff_max_lines_displayed: Max number of diff lines displayed
230 setting_diff_max_lines_displayed: Max number of diff lines displayed
231 setting_repository_log_display_limit: Maximum number of revisions displayed on file log
231 setting_repository_log_display_limit: Maximum number of revisions displayed on file log
232 setting_openid: Allow OpenID login and registration
232
233
233 permission_edit_project: Edit project
234 permission_edit_project: Edit project
234 permission_select_project_modules: Select project modules
235 permission_select_project_modules: Select project modules
235 permission_manage_members: Manage members
236 permission_manage_members: Manage members
236 permission_manage_versions: Manage versions
237 permission_manage_versions: Manage versions
237 permission_manage_categories: Manage issue categories
238 permission_manage_categories: Manage issue categories
238 permission_add_issues: Add issues
239 permission_add_issues: Add issues
239 permission_edit_issues: Edit issues
240 permission_edit_issues: Edit issues
240 permission_manage_issue_relations: Manage issue relations
241 permission_manage_issue_relations: Manage issue relations
241 permission_add_issue_notes: Add notes
242 permission_add_issue_notes: Add notes
242 permission_edit_issue_notes: Edit notes
243 permission_edit_issue_notes: Edit notes
243 permission_edit_own_issue_notes: Edit own notes
244 permission_edit_own_issue_notes: Edit own notes
244 permission_move_issues: Move issues
245 permission_move_issues: Move issues
245 permission_delete_issues: Delete issues
246 permission_delete_issues: Delete issues
246 permission_manage_public_queries: Manage public queries
247 permission_manage_public_queries: Manage public queries
247 permission_save_queries: Save queries
248 permission_save_queries: Save queries
248 permission_view_gantt: View gantt chart
249 permission_view_gantt: View gantt chart
249 permission_view_calendar: View calender
250 permission_view_calendar: View calender
250 permission_view_issue_watchers: View watchers list
251 permission_view_issue_watchers: View watchers list
251 permission_add_issue_watchers: Add watchers
252 permission_add_issue_watchers: Add watchers
252 permission_log_time: Log spent time
253 permission_log_time: Log spent time
253 permission_view_time_entries: View spent time
254 permission_view_time_entries: View spent time
254 permission_edit_time_entries: Edit time logs
255 permission_edit_time_entries: Edit time logs
255 permission_edit_own_time_entries: Edit own time logs
256 permission_edit_own_time_entries: Edit own time logs
256 permission_manage_news: Manage news
257 permission_manage_news: Manage news
257 permission_comment_news: Comment news
258 permission_comment_news: Comment news
258 permission_manage_documents: Manage documents
259 permission_manage_documents: Manage documents
259 permission_view_documents: View documents
260 permission_view_documents: View documents
260 permission_manage_files: Manage files
261 permission_manage_files: Manage files
261 permission_view_files: View files
262 permission_view_files: View files
262 permission_manage_wiki: Manage wiki
263 permission_manage_wiki: Manage wiki
263 permission_rename_wiki_pages: Rename wiki pages
264 permission_rename_wiki_pages: Rename wiki pages
264 permission_delete_wiki_pages: Delete wiki pages
265 permission_delete_wiki_pages: Delete wiki pages
265 permission_view_wiki_pages: View wiki
266 permission_view_wiki_pages: View wiki
266 permission_view_wiki_edits: View wiki history
267 permission_view_wiki_edits: View wiki history
267 permission_edit_wiki_pages: Edit wiki pages
268 permission_edit_wiki_pages: Edit wiki pages
268 permission_delete_wiki_pages_attachments: Delete attachments
269 permission_delete_wiki_pages_attachments: Delete attachments
269 permission_protect_wiki_pages: Protect wiki pages
270 permission_protect_wiki_pages: Protect wiki pages
270 permission_manage_repository: Manage repository
271 permission_manage_repository: Manage repository
271 permission_browse_repository: Browse repository
272 permission_browse_repository: Browse repository
272 permission_view_changesets: View changesets
273 permission_view_changesets: View changesets
273 permission_commit_access: Commit access
274 permission_commit_access: Commit access
274 permission_manage_boards: Manage boards
275 permission_manage_boards: Manage boards
275 permission_view_messages: View messages
276 permission_view_messages: View messages
276 permission_add_messages: Post messages
277 permission_add_messages: Post messages
277 permission_edit_messages: Edit messages
278 permission_edit_messages: Edit messages
278 permission_edit_own_messages: Edit own messages
279 permission_edit_own_messages: Edit own messages
279 permission_delete_messages: Delete messages
280 permission_delete_messages: Delete messages
280 permission_delete_own_messages: Delete own messages
281 permission_delete_own_messages: Delete own messages
281
282
282 project_module_issue_tracking: Issue tracking
283 project_module_issue_tracking: Issue tracking
283 project_module_time_tracking: Time tracking
284 project_module_time_tracking: Time tracking
284 project_module_news: News
285 project_module_news: News
285 project_module_documents: Documents
286 project_module_documents: Documents
286 project_module_files: Files
287 project_module_files: Files
287 project_module_wiki: Wiki
288 project_module_wiki: Wiki
288 project_module_repository: Repository
289 project_module_repository: Repository
289 project_module_boards: Boards
290 project_module_boards: Boards
290
291
291 label_user: User
292 label_user: User
292 label_user_plural: Users
293 label_user_plural: Users
293 label_user_new: New user
294 label_user_new: New user
294 label_project: Project
295 label_project: Project
295 label_project_new: New project
296 label_project_new: New project
296 label_project_plural: Projects
297 label_project_plural: Projects
297 label_project_all: All Projects
298 label_project_all: All Projects
298 label_project_latest: Latest projects
299 label_project_latest: Latest projects
299 label_issue: Issue
300 label_issue: Issue
300 label_issue_new: New issue
301 label_issue_new: New issue
301 label_issue_plural: Issues
302 label_issue_plural: Issues
302 label_issue_view_all: View all issues
303 label_issue_view_all: View all issues
303 label_issues_by: Issues by %s
304 label_issues_by: Issues by %s
304 label_issue_added: Issue added
305 label_issue_added: Issue added
305 label_issue_updated: Issue updated
306 label_issue_updated: Issue updated
306 label_document: Document
307 label_document: Document
307 label_document_new: New document
308 label_document_new: New document
308 label_document_plural: Documents
309 label_document_plural: Documents
309 label_document_added: Document added
310 label_document_added: Document added
310 label_role: Role
311 label_role: Role
311 label_role_plural: Roles
312 label_role_plural: Roles
312 label_role_new: New role
313 label_role_new: New role
313 label_role_and_permissions: Roles and permissions
314 label_role_and_permissions: Roles and permissions
314 label_member: Member
315 label_member: Member
315 label_member_new: New member
316 label_member_new: New member
316 label_member_plural: Members
317 label_member_plural: Members
317 label_tracker: Tracker
318 label_tracker: Tracker
318 label_tracker_plural: Trackers
319 label_tracker_plural: Trackers
319 label_tracker_new: New tracker
320 label_tracker_new: New tracker
320 label_workflow: Workflow
321 label_workflow: Workflow
321 label_issue_status: Issue status
322 label_issue_status: Issue status
322 label_issue_status_plural: Issue statuses
323 label_issue_status_plural: Issue statuses
323 label_issue_status_new: New status
324 label_issue_status_new: New status
324 label_issue_category: Issue category
325 label_issue_category: Issue category
325 label_issue_category_plural: Issue categories
326 label_issue_category_plural: Issue categories
326 label_issue_category_new: New category
327 label_issue_category_new: New category
327 label_custom_field: Custom field
328 label_custom_field: Custom field
328 label_custom_field_plural: Custom fields
329 label_custom_field_plural: Custom fields
329 label_custom_field_new: New custom field
330 label_custom_field_new: New custom field
330 label_enumerations: Enumerations
331 label_enumerations: Enumerations
331 label_enumeration_new: New value
332 label_enumeration_new: New value
332 label_information: Information
333 label_information: Information
333 label_information_plural: Information
334 label_information_plural: Information
334 label_please_login: Please log in
335 label_please_login: Please log in
335 label_register: Register
336 label_register: Register
336 label_login_with_open_id_option: or login with OpenID
337 label_login_with_open_id_option: or login with OpenID
337 label_password_lost: Lost password
338 label_password_lost: Lost password
338 label_home: Home
339 label_home: Home
339 label_my_page: My page
340 label_my_page: My page
340 label_my_account: My account
341 label_my_account: My account
341 label_my_projects: My projects
342 label_my_projects: My projects
342 label_administration: Administration
343 label_administration: Administration
343 label_login: Sign in
344 label_login: Sign in
344 label_logout: Sign out
345 label_logout: Sign out
345 label_help: Help
346 label_help: Help
346 label_reported_issues: Reported issues
347 label_reported_issues: Reported issues
347 label_assigned_to_me_issues: Issues assigned to me
348 label_assigned_to_me_issues: Issues assigned to me
348 label_last_login: Last connection
349 label_last_login: Last connection
349 label_last_updates: Last updated
350 label_last_updates: Last updated
350 label_last_updates_plural: %d last updated
351 label_last_updates_plural: %d last updated
351 label_registered_on: Registered on
352 label_registered_on: Registered on
352 label_activity: Activity
353 label_activity: Activity
353 label_overall_activity: Overall activity
354 label_overall_activity: Overall activity
354 label_user_activity: "%s's activity"
355 label_user_activity: "%s's activity"
355 label_new: New
356 label_new: New
356 label_logged_as: Logged in as
357 label_logged_as: Logged in as
357 label_environment: Environment
358 label_environment: Environment
358 label_authentication: Authentication
359 label_authentication: Authentication
359 label_auth_source: Authentication mode
360 label_auth_source: Authentication mode
360 label_auth_source_new: New authentication mode
361 label_auth_source_new: New authentication mode
361 label_auth_source_plural: Authentication modes
362 label_auth_source_plural: Authentication modes
362 label_subproject_plural: Subprojects
363 label_subproject_plural: Subprojects
363 label_and_its_subprojects: %s and its subprojects
364 label_and_its_subprojects: %s and its subprojects
364 label_min_max_length: Min - Max length
365 label_min_max_length: Min - Max length
365 label_list: List
366 label_list: List
366 label_date: Date
367 label_date: Date
367 label_integer: Integer
368 label_integer: Integer
368 label_float: Float
369 label_float: Float
369 label_boolean: Boolean
370 label_boolean: Boolean
370 label_string: Text
371 label_string: Text
371 label_text: Long text
372 label_text: Long text
372 label_attribute: Attribute
373 label_attribute: Attribute
373 label_attribute_plural: Attributes
374 label_attribute_plural: Attributes
374 label_download: %d Download
375 label_download: %d Download
375 label_download_plural: %d Downloads
376 label_download_plural: %d Downloads
376 label_no_data: No data to display
377 label_no_data: No data to display
377 label_change_status: Change status
378 label_change_status: Change status
378 label_history: History
379 label_history: History
379 label_attachment: File
380 label_attachment: File
380 label_attachment_new: New file
381 label_attachment_new: New file
381 label_attachment_delete: Delete file
382 label_attachment_delete: Delete file
382 label_attachment_plural: Files
383 label_attachment_plural: Files
383 label_file_added: File added
384 label_file_added: File added
384 label_report: Report
385 label_report: Report
385 label_report_plural: Reports
386 label_report_plural: Reports
386 label_news: News
387 label_news: News
387 label_news_new: Add news
388 label_news_new: Add news
388 label_news_plural: News
389 label_news_plural: News
389 label_news_latest: Latest news
390 label_news_latest: Latest news
390 label_news_view_all: View all news
391 label_news_view_all: View all news
391 label_news_added: News added
392 label_news_added: News added
392 label_change_log: Change log
393 label_change_log: Change log
393 label_settings: Settings
394 label_settings: Settings
394 label_overview: Overview
395 label_overview: Overview
395 label_version: Version
396 label_version: Version
396 label_version_new: New version
397 label_version_new: New version
397 label_version_plural: Versions
398 label_version_plural: Versions
398 label_confirmation: Confirmation
399 label_confirmation: Confirmation
399 label_export_to: 'Also available in:'
400 label_export_to: 'Also available in:'
400 label_read: Read...
401 label_read: Read...
401 label_public_projects: Public projects
402 label_public_projects: Public projects
402 label_open_issues: open
403 label_open_issues: open
403 label_open_issues_plural: open
404 label_open_issues_plural: open
404 label_closed_issues: closed
405 label_closed_issues: closed
405 label_closed_issues_plural: closed
406 label_closed_issues_plural: closed
406 label_total: Total
407 label_total: Total
407 label_permissions: Permissions
408 label_permissions: Permissions
408 label_current_status: Current status
409 label_current_status: Current status
409 label_new_statuses_allowed: New statuses allowed
410 label_new_statuses_allowed: New statuses allowed
410 label_all: all
411 label_all: all
411 label_none: none
412 label_none: none
412 label_nobody: nobody
413 label_nobody: nobody
413 label_next: Next
414 label_next: Next
414 label_previous: Previous
415 label_previous: Previous
415 label_used_by: Used by
416 label_used_by: Used by
416 label_details: Details
417 label_details: Details
417 label_add_note: Add a note
418 label_add_note: Add a note
418 label_per_page: Per page
419 label_per_page: Per page
419 label_calendar: Calendar
420 label_calendar: Calendar
420 label_months_from: months from
421 label_months_from: months from
421 label_gantt: Gantt
422 label_gantt: Gantt
422 label_internal: Internal
423 label_internal: Internal
423 label_last_changes: last %d changes
424 label_last_changes: last %d changes
424 label_change_view_all: View all changes
425 label_change_view_all: View all changes
425 label_personalize_page: Personalize this page
426 label_personalize_page: Personalize this page
426 label_comment: Comment
427 label_comment: Comment
427 label_comment_plural: Comments
428 label_comment_plural: Comments
428 label_comment_add: Add a comment
429 label_comment_add: Add a comment
429 label_comment_added: Comment added
430 label_comment_added: Comment added
430 label_comment_delete: Delete comments
431 label_comment_delete: Delete comments
431 label_query: Custom query
432 label_query: Custom query
432 label_query_plural: Custom queries
433 label_query_plural: Custom queries
433 label_query_new: New query
434 label_query_new: New query
434 label_filter_add: Add filter
435 label_filter_add: Add filter
435 label_filter_plural: Filters
436 label_filter_plural: Filters
436 label_equals: is
437 label_equals: is
437 label_not_equals: is not
438 label_not_equals: is not
438 label_in_less_than: in less than
439 label_in_less_than: in less than
439 label_in_more_than: in more than
440 label_in_more_than: in more than
440 label_in: in
441 label_in: in
441 label_today: today
442 label_today: today
442 label_all_time: all time
443 label_all_time: all time
443 label_yesterday: yesterday
444 label_yesterday: yesterday
444 label_this_week: this week
445 label_this_week: this week
445 label_last_week: last week
446 label_last_week: last week
446 label_last_n_days: last %d days
447 label_last_n_days: last %d days
447 label_this_month: this month
448 label_this_month: this month
448 label_last_month: last month
449 label_last_month: last month
449 label_this_year: this year
450 label_this_year: this year
450 label_date_range: Date range
451 label_date_range: Date range
451 label_less_than_ago: less than days ago
452 label_less_than_ago: less than days ago
452 label_more_than_ago: more than days ago
453 label_more_than_ago: more than days ago
453 label_ago: days ago
454 label_ago: days ago
454 label_contains: contains
455 label_contains: contains
455 label_not_contains: doesn't contain
456 label_not_contains: doesn't contain
456 label_day_plural: days
457 label_day_plural: days
457 label_repository: Repository
458 label_repository: Repository
458 label_repository_plural: Repositories
459 label_repository_plural: Repositories
459 label_browse: Browse
460 label_browse: Browse
460 label_modification: %d change
461 label_modification: %d change
461 label_modification_plural: %d changes
462 label_modification_plural: %d changes
462 label_revision: Revision
463 label_revision: Revision
463 label_revision_plural: Revisions
464 label_revision_plural: Revisions
464 label_associated_revisions: Associated revisions
465 label_associated_revisions: Associated revisions
465 label_added: added
466 label_added: added
466 label_modified: modified
467 label_modified: modified
467 label_copied: copied
468 label_copied: copied
468 label_renamed: renamed
469 label_renamed: renamed
469 label_deleted: deleted
470 label_deleted: deleted
470 label_latest_revision: Latest revision
471 label_latest_revision: Latest revision
471 label_latest_revision_plural: Latest revisions
472 label_latest_revision_plural: Latest revisions
472 label_view_revisions: View revisions
473 label_view_revisions: View revisions
473 label_max_size: Maximum size
474 label_max_size: Maximum size
474 label_on: 'on'
475 label_on: 'on'
475 label_sort_highest: Move to top
476 label_sort_highest: Move to top
476 label_sort_higher: Move up
477 label_sort_higher: Move up
477 label_sort_lower: Move down
478 label_sort_lower: Move down
478 label_sort_lowest: Move to bottom
479 label_sort_lowest: Move to bottom
479 label_roadmap: Roadmap
480 label_roadmap: Roadmap
480 label_roadmap_due_in: Due in %s
481 label_roadmap_due_in: Due in %s
481 label_roadmap_overdue: %s late
482 label_roadmap_overdue: %s late
482 label_roadmap_no_issues: No issues for this version
483 label_roadmap_no_issues: No issues for this version
483 label_search: Search
484 label_search: Search
484 label_result_plural: Results
485 label_result_plural: Results
485 label_all_words: All words
486 label_all_words: All words
486 label_wiki: Wiki
487 label_wiki: Wiki
487 label_wiki_edit: Wiki edit
488 label_wiki_edit: Wiki edit
488 label_wiki_edit_plural: Wiki edits
489 label_wiki_edit_plural: Wiki edits
489 label_wiki_page: Wiki page
490 label_wiki_page: Wiki page
490 label_wiki_page_plural: Wiki pages
491 label_wiki_page_plural: Wiki pages
491 label_index_by_title: Index by title
492 label_index_by_title: Index by title
492 label_index_by_date: Index by date
493 label_index_by_date: Index by date
493 label_current_version: Current version
494 label_current_version: Current version
494 label_preview: Preview
495 label_preview: Preview
495 label_feed_plural: Feeds
496 label_feed_plural: Feeds
496 label_changes_details: Details of all changes
497 label_changes_details: Details of all changes
497 label_issue_tracking: Issue tracking
498 label_issue_tracking: Issue tracking
498 label_spent_time: Spent time
499 label_spent_time: Spent time
499 label_f_hour: %.2f hour
500 label_f_hour: %.2f hour
500 label_f_hour_plural: %.2f hours
501 label_f_hour_plural: %.2f hours
501 label_time_tracking: Time tracking
502 label_time_tracking: Time tracking
502 label_change_plural: Changes
503 label_change_plural: Changes
503 label_statistics: Statistics
504 label_statistics: Statistics
504 label_commits_per_month: Commits per month
505 label_commits_per_month: Commits per month
505 label_commits_per_author: Commits per author
506 label_commits_per_author: Commits per author
506 label_view_diff: View differences
507 label_view_diff: View differences
507 label_diff_inline: inline
508 label_diff_inline: inline
508 label_diff_side_by_side: side by side
509 label_diff_side_by_side: side by side
509 label_options: Options
510 label_options: Options
510 label_copy_workflow_from: Copy workflow from
511 label_copy_workflow_from: Copy workflow from
511 label_permissions_report: Permissions report
512 label_permissions_report: Permissions report
512 label_watched_issues: Watched issues
513 label_watched_issues: Watched issues
513 label_related_issues: Related issues
514 label_related_issues: Related issues
514 label_applied_status: Applied status
515 label_applied_status: Applied status
515 label_loading: Loading...
516 label_loading: Loading...
516 label_relation_new: New relation
517 label_relation_new: New relation
517 label_relation_delete: Delete relation
518 label_relation_delete: Delete relation
518 label_relates_to: related to
519 label_relates_to: related to
519 label_duplicates: duplicates
520 label_duplicates: duplicates
520 label_duplicated_by: duplicated by
521 label_duplicated_by: duplicated by
521 label_blocks: blocks
522 label_blocks: blocks
522 label_blocked_by: blocked by
523 label_blocked_by: blocked by
523 label_precedes: precedes
524 label_precedes: precedes
524 label_follows: follows
525 label_follows: follows
525 label_end_to_start: end to start
526 label_end_to_start: end to start
526 label_end_to_end: end to end
527 label_end_to_end: end to end
527 label_start_to_start: start to start
528 label_start_to_start: start to start
528 label_start_to_end: start to end
529 label_start_to_end: start to end
529 label_stay_logged_in: Stay logged in
530 label_stay_logged_in: Stay logged in
530 label_disabled: disabled
531 label_disabled: disabled
531 label_show_completed_versions: Show completed versions
532 label_show_completed_versions: Show completed versions
532 label_me: me
533 label_me: me
533 label_board: Forum
534 label_board: Forum
534 label_board_new: New forum
535 label_board_new: New forum
535 label_board_plural: Forums
536 label_board_plural: Forums
536 label_topic_plural: Topics
537 label_topic_plural: Topics
537 label_message_plural: Messages
538 label_message_plural: Messages
538 label_message_last: Last message
539 label_message_last: Last message
539 label_message_new: New message
540 label_message_new: New message
540 label_message_posted: Message added
541 label_message_posted: Message added
541 label_reply_plural: Replies
542 label_reply_plural: Replies
542 label_send_information: Send account information to the user
543 label_send_information: Send account information to the user
543 label_year: Year
544 label_year: Year
544 label_month: Month
545 label_month: Month
545 label_week: Week
546 label_week: Week
546 label_date_from: From
547 label_date_from: From
547 label_date_to: To
548 label_date_to: To
548 label_language_based: Based on user's language
549 label_language_based: Based on user's language
549 label_sort_by: Sort by %s
550 label_sort_by: Sort by %s
550 label_send_test_email: Send a test email
551 label_send_test_email: Send a test email
551 label_feeds_access_key_created_on: RSS access key created %s ago
552 label_feeds_access_key_created_on: RSS access key created %s ago
552 label_module_plural: Modules
553 label_module_plural: Modules
553 label_added_time_by: Added by %s %s ago
554 label_added_time_by: Added by %s %s ago
554 label_updated_time_by: Updated by %s %s ago
555 label_updated_time_by: Updated by %s %s ago
555 label_updated_time: Updated %s ago
556 label_updated_time: Updated %s ago
556 label_jump_to_a_project: Jump to a project...
557 label_jump_to_a_project: Jump to a project...
557 label_file_plural: Files
558 label_file_plural: Files
558 label_changeset_plural: Changesets
559 label_changeset_plural: Changesets
559 label_default_columns: Default columns
560 label_default_columns: Default columns
560 label_no_change_option: (No change)
561 label_no_change_option: (No change)
561 label_bulk_edit_selected_issues: Bulk edit selected issues
562 label_bulk_edit_selected_issues: Bulk edit selected issues
562 label_theme: Theme
563 label_theme: Theme
563 label_default: Default
564 label_default: Default
564 label_search_titles_only: Search titles only
565 label_search_titles_only: Search titles only
565 label_user_mail_option_all: "For any event on all my projects"
566 label_user_mail_option_all: "For any event on all my projects"
566 label_user_mail_option_selected: "For any event on the selected projects only..."
567 label_user_mail_option_selected: "For any event on the selected projects only..."
567 label_user_mail_option_none: "Only for things I watch or I'm involved in"
568 label_user_mail_option_none: "Only for things I watch or I'm involved in"
568 label_user_mail_no_self_notified: "I don't want to be notified of changes that I make myself"
569 label_user_mail_no_self_notified: "I don't want to be notified of changes that I make myself"
569 label_registration_activation_by_email: account activation by email
570 label_registration_activation_by_email: account activation by email
570 label_registration_manual_activation: manual account activation
571 label_registration_manual_activation: manual account activation
571 label_registration_automatic_activation: automatic account activation
572 label_registration_automatic_activation: automatic account activation
572 label_display_per_page: 'Per page: %s'
573 label_display_per_page: 'Per page: %s'
573 label_age: Age
574 label_age: Age
574 label_change_properties: Change properties
575 label_change_properties: Change properties
575 label_general: General
576 label_general: General
576 label_more: More
577 label_more: More
577 label_scm: SCM
578 label_scm: SCM
578 label_plugins: Plugins
579 label_plugins: Plugins
579 label_ldap_authentication: LDAP authentication
580 label_ldap_authentication: LDAP authentication
580 label_downloads_abbr: D/L
581 label_downloads_abbr: D/L
581 label_optional_description: Optional description
582 label_optional_description: Optional description
582 label_add_another_file: Add another file
583 label_add_another_file: Add another file
583 label_preferences: Preferences
584 label_preferences: Preferences
584 label_chronological_order: In chronological order
585 label_chronological_order: In chronological order
585 label_reverse_chronological_order: In reverse chronological order
586 label_reverse_chronological_order: In reverse chronological order
586 label_planning: Planning
587 label_planning: Planning
587 label_incoming_emails: Incoming emails
588 label_incoming_emails: Incoming emails
588 label_generate_key: Generate a key
589 label_generate_key: Generate a key
589 label_issue_watchers: Watchers
590 label_issue_watchers: Watchers
590 label_example: Example
591 label_example: Example
591 label_display: Display
592 label_display: Display
592
593
593 button_login: Login
594 button_login: Login
594 button_submit: Submit
595 button_submit: Submit
595 button_save: Save
596 button_save: Save
596 button_check_all: Check all
597 button_check_all: Check all
597 button_uncheck_all: Uncheck all
598 button_uncheck_all: Uncheck all
598 button_delete: Delete
599 button_delete: Delete
599 button_create: Create
600 button_create: Create
600 button_create_and_continue: Create and continue
601 button_create_and_continue: Create and continue
601 button_test: Test
602 button_test: Test
602 button_edit: Edit
603 button_edit: Edit
603 button_add: Add
604 button_add: Add
604 button_change: Change
605 button_change: Change
605 button_apply: Apply
606 button_apply: Apply
606 button_clear: Clear
607 button_clear: Clear
607 button_lock: Lock
608 button_lock: Lock
608 button_unlock: Unlock
609 button_unlock: Unlock
609 button_download: Download
610 button_download: Download
610 button_list: List
611 button_list: List
611 button_view: View
612 button_view: View
612 button_move: Move
613 button_move: Move
613 button_back: Back
614 button_back: Back
614 button_cancel: Cancel
615 button_cancel: Cancel
615 button_activate: Activate
616 button_activate: Activate
616 button_sort: Sort
617 button_sort: Sort
617 button_log_time: Log time
618 button_log_time: Log time
618 button_rollback: Rollback to this version
619 button_rollback: Rollback to this version
619 button_watch: Watch
620 button_watch: Watch
620 button_unwatch: Unwatch
621 button_unwatch: Unwatch
621 button_reply: Reply
622 button_reply: Reply
622 button_archive: Archive
623 button_archive: Archive
623 button_unarchive: Unarchive
624 button_unarchive: Unarchive
624 button_reset: Reset
625 button_reset: Reset
625 button_rename: Rename
626 button_rename: Rename
626 button_change_password: Change password
627 button_change_password: Change password
627 button_copy: Copy
628 button_copy: Copy
628 button_annotate: Annotate
629 button_annotate: Annotate
629 button_update: Update
630 button_update: Update
630 button_configure: Configure
631 button_configure: Configure
631 button_quote: Quote
632 button_quote: Quote
632
633
633 status_active: active
634 status_active: active
634 status_registered: registered
635 status_registered: registered
635 status_locked: locked
636 status_locked: locked
636
637
637 text_select_mail_notifications: Select actions for which email notifications should be sent.
638 text_select_mail_notifications: Select actions for which email notifications should be sent.
638 text_regexp_info: eg. ^[A-Z0-9]+$
639 text_regexp_info: eg. ^[A-Z0-9]+$
639 text_min_max_length_info: 0 means no restriction
640 text_min_max_length_info: 0 means no restriction
640 text_project_destroy_confirmation: Are you sure you want to delete this project and related data ?
641 text_project_destroy_confirmation: Are you sure you want to delete this project and related data ?
641 text_subprojects_destroy_warning: 'Its subproject(s): %s will be also deleted.'
642 text_subprojects_destroy_warning: 'Its subproject(s): %s will be also deleted.'
642 text_workflow_edit: Select a role and a tracker to edit the workflow
643 text_workflow_edit: Select a role and a tracker to edit the workflow
643 text_are_you_sure: Are you sure ?
644 text_are_you_sure: Are you sure ?
644 text_journal_changed: changed from %s to %s
645 text_journal_changed: changed from %s to %s
645 text_journal_set_to: set to %s
646 text_journal_set_to: set to %s
646 text_journal_deleted: deleted
647 text_journal_deleted: deleted
647 text_tip_task_begin_day: task beginning this day
648 text_tip_task_begin_day: task beginning this day
648 text_tip_task_end_day: task ending this day
649 text_tip_task_end_day: task ending this day
649 text_tip_task_begin_end_day: task beginning and ending this day
650 text_tip_task_begin_end_day: task beginning and ending this day
650 text_project_identifier_info: 'Only lower case letters (a-z), numbers and dashes are allowed.<br />Once saved, the identifier can not be changed.'
651 text_project_identifier_info: 'Only lower case letters (a-z), numbers and dashes are allowed.<br />Once saved, the identifier can not be changed.'
651 text_caracters_maximum: %d characters maximum.
652 text_caracters_maximum: %d characters maximum.
652 text_caracters_minimum: Must be at least %d characters long.
653 text_caracters_minimum: Must be at least %d characters long.
653 text_length_between: Length between %d and %d characters.
654 text_length_between: Length between %d and %d characters.
654 text_tracker_no_workflow: No workflow defined for this tracker
655 text_tracker_no_workflow: No workflow defined for this tracker
655 text_unallowed_characters: Unallowed characters
656 text_unallowed_characters: Unallowed characters
656 text_comma_separated: Multiple values allowed (comma separated).
657 text_comma_separated: Multiple values allowed (comma separated).
657 text_issues_ref_in_commit_messages: Referencing and fixing issues in commit messages
658 text_issues_ref_in_commit_messages: Referencing and fixing issues in commit messages
658 text_issue_added: Issue %s has been reported by %s.
659 text_issue_added: Issue %s has been reported by %s.
659 text_issue_updated: Issue %s has been updated by %s.
660 text_issue_updated: Issue %s has been updated by %s.
660 text_wiki_destroy_confirmation: Are you sure you want to delete this wiki and all its content ?
661 text_wiki_destroy_confirmation: Are you sure you want to delete this wiki and all its content ?
661 text_issue_category_destroy_question: Some issues (%d) are assigned to this category. What do you want to do ?
662 text_issue_category_destroy_question: Some issues (%d) are assigned to this category. What do you want to do ?
662 text_issue_category_destroy_assignments: Remove category assignments
663 text_issue_category_destroy_assignments: Remove category assignments
663 text_issue_category_reassign_to: Reassign issues to this category
664 text_issue_category_reassign_to: Reassign issues to this category
664 text_user_mail_option: "For unselected projects, you will only receive notifications about things you watch or you're involved in (eg. issues you're the author or assignee)."
665 text_user_mail_option: "For unselected projects, you will only receive notifications about things you watch or you're involved in (eg. issues you're the author or assignee)."
665 text_no_configuration_data: "Roles, trackers, issue statuses and workflow have not been configured yet.\nIt is highly recommended to load the default configuration. You will be able to modify it once loaded."
666 text_no_configuration_data: "Roles, trackers, issue statuses and workflow have not been configured yet.\nIt is highly recommended to load the default configuration. You will be able to modify it once loaded."
666 text_load_default_configuration: Load the default configuration
667 text_load_default_configuration: Load the default configuration
667 text_status_changed_by_changeset: Applied in changeset %s.
668 text_status_changed_by_changeset: Applied in changeset %s.
668 text_issues_destroy_confirmation: 'Are you sure you want to delete the selected issue(s) ?'
669 text_issues_destroy_confirmation: 'Are you sure you want to delete the selected issue(s) ?'
669 text_select_project_modules: 'Select modules to enable for this project:'
670 text_select_project_modules: 'Select modules to enable for this project:'
670 text_default_administrator_account_changed: Default administrator account changed
671 text_default_administrator_account_changed: Default administrator account changed
671 text_file_repository_writable: Attachments directory writable
672 text_file_repository_writable: Attachments directory writable
672 text_plugin_assets_writable: Plugin assets directory writable
673 text_plugin_assets_writable: Plugin assets directory writable
673 text_rmagick_available: RMagick available (optional)
674 text_rmagick_available: RMagick available (optional)
674 text_destroy_time_entries_question: %.02f hours were reported on the issues you are about to delete. What do you want to do ?
675 text_destroy_time_entries_question: %.02f hours were reported on the issues you are about to delete. What do you want to do ?
675 text_destroy_time_entries: Delete reported hours
676 text_destroy_time_entries: Delete reported hours
676 text_assign_time_entries_to_project: Assign reported hours to the project
677 text_assign_time_entries_to_project: Assign reported hours to the project
677 text_reassign_time_entries: 'Reassign reported hours to this issue:'
678 text_reassign_time_entries: 'Reassign reported hours to this issue:'
678 text_user_wrote: '%s wrote:'
679 text_user_wrote: '%s wrote:'
679 text_enumeration_destroy_question: '%d objects are assigned to this value.'
680 text_enumeration_destroy_question: '%d objects are assigned to this value.'
680 text_enumeration_category_reassign_to: 'Reassign them to this value:'
681 text_enumeration_category_reassign_to: 'Reassign them to this value:'
681 text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them."
682 text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them."
682 text_repository_usernames_mapping: "Select or update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped."
683 text_repository_usernames_mapping: "Select or update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped."
683 text_diff_truncated: '... This diff was truncated because it exceeds the maximum size that can be displayed.'
684 text_diff_truncated: '... This diff was truncated because it exceeds the maximum size that can be displayed.'
684 text_custom_field_possible_values_info: 'One line for each value'
685 text_custom_field_possible_values_info: 'One line for each value'
685
686
686 default_role_manager: Manager
687 default_role_manager: Manager
687 default_role_developper: Developer
688 default_role_developper: Developer
688 default_role_reporter: Reporter
689 default_role_reporter: Reporter
689 default_tracker_bug: Bug
690 default_tracker_bug: Bug
690 default_tracker_feature: Feature
691 default_tracker_feature: Feature
691 default_tracker_support: Support
692 default_tracker_support: Support
692 default_issue_status_new: New
693 default_issue_status_new: New
693 default_issue_status_assigned: Assigned
694 default_issue_status_assigned: Assigned
694 default_issue_status_resolved: Resolved
695 default_issue_status_resolved: Resolved
695 default_issue_status_feedback: Feedback
696 default_issue_status_feedback: Feedback
696 default_issue_status_closed: Closed
697 default_issue_status_closed: Closed
697 default_issue_status_rejected: Rejected
698 default_issue_status_rejected: Rejected
698 default_doc_category_user: User documentation
699 default_doc_category_user: User documentation
699 default_doc_category_tech: Technical documentation
700 default_doc_category_tech: Technical documentation
700 default_priority_low: Low
701 default_priority_low: Low
701 default_priority_normal: Normal
702 default_priority_normal: Normal
702 default_priority_high: High
703 default_priority_high: High
703 default_priority_urgent: Urgent
704 default_priority_urgent: Urgent
704 default_priority_immediate: Immediate
705 default_priority_immediate: Immediate
705 default_activity_design: Design
706 default_activity_design: Design
706 default_activity_development: Development
707 default_activity_development: Development
707
708
708 enumeration_issue_priorities: Issue priorities
709 enumeration_issue_priorities: Issue priorities
709 enumeration_doc_categories: Document categories
710 enumeration_doc_categories: Document categories
710 enumeration_activities: Activities (time tracking)
711 enumeration_activities: Activities (time tracking)
@@ -1,148 +1,154
1 # redMine - project management software
1 # redMine - project management software
2 # Copyright (C) 2006-2007 Jean-Philippe Lang
2 # Copyright (C) 2006-2007 Jean-Philippe Lang
3 #
3 #
4 # This program is free software; you can redistribute it and/or
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
7 # of the License, or (at your option) any later version.
8 #
8 #
9 # This program is distributed in the hope that it will be useful,
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
12 # GNU General Public License for more details.
13 #
13 #
14 # You should have received a copy of the GNU General Public License
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
17
18 require File.dirname(__FILE__) + '/../test_helper'
18 require File.dirname(__FILE__) + '/../test_helper'
19 require 'account_controller'
19 require 'account_controller'
20
20
21 # Re-raise errors caught by the controller.
21 # Re-raise errors caught by the controller.
22 class AccountController; def rescue_action(e) raise e end; end
22 class AccountController; def rescue_action(e) raise e end; end
23
23
24 class AccountControllerTest < Test::Unit::TestCase
24 class AccountControllerTest < Test::Unit::TestCase
25 fixtures :users, :roles
25 fixtures :users, :roles
26
26
27 def setup
27 def setup
28 @controller = AccountController.new
28 @controller = AccountController.new
29 @request = ActionController::TestRequest.new
29 @request = ActionController::TestRequest.new
30 @response = ActionController::TestResponse.new
30 @response = ActionController::TestResponse.new
31 User.current = nil
31 User.current = nil
32 end
32 end
33
33
34 def test_show
34 def test_show
35 get :show, :id => 2
35 get :show, :id => 2
36 assert_response :success
36 assert_response :success
37 assert_template 'show'
37 assert_template 'show'
38 assert_not_nil assigns(:user)
38 assert_not_nil assigns(:user)
39 end
39 end
40
40
41 def test_show_inactive
41 def test_show_inactive
42 get :show, :id => 5
42 get :show, :id => 5
43 assert_response 404
43 assert_response 404
44 assert_nil assigns(:user)
44 assert_nil assigns(:user)
45 end
45 end
46
46
47 def test_login_should_redirect_to_back_url_param
47 def test_login_should_redirect_to_back_url_param
48 # request.uri is "test.host" in test environment
48 # request.uri is "test.host" in test environment
49 post :login, :username => 'jsmith', :password => 'jsmith', :back_url => 'http%3A%2F%2Ftest.host%2Fissues%2Fshow%2F1'
49 post :login, :username => 'jsmith', :password => 'jsmith', :back_url => 'http%3A%2F%2Ftest.host%2Fissues%2Fshow%2F1'
50 assert_redirected_to '/issues/show/1'
50 assert_redirected_to '/issues/show/1'
51 end
51 end
52
52
53 def test_login_should_not_redirect_to_another_host
53 def test_login_should_not_redirect_to_another_host
54 post :login, :username => 'jsmith', :password => 'jsmith', :back_url => 'http%3A%2F%2Ftest.foo%2Ffake'
54 post :login, :username => 'jsmith', :password => 'jsmith', :back_url => 'http%3A%2F%2Ftest.foo%2Ffake'
55 assert_redirected_to '/my/page'
55 assert_redirected_to '/my/page'
56 end
56 end
57
57
58 def test_login_with_wrong_password
58 def test_login_with_wrong_password
59 post :login, :username => 'admin', :password => 'bad'
59 post :login, :username => 'admin', :password => 'bad'
60 assert_response :success
60 assert_response :success
61 assert_template 'login'
61 assert_template 'login'
62 assert_tag 'div',
62 assert_tag 'div',
63 :attributes => { :class => "flash error" },
63 :attributes => { :class => "flash error" },
64 :content => /Invalid user or password/
64 :content => /Invalid user or password/
65 end
65 end
66
66
67 def test_login_with_openid_for_existing_user
67 def test_login_with_openid_for_existing_user
68 Setting.self_registration = '3'
68 Setting.self_registration = '3'
69 Setting.openid = '1'
69 existing_user = User.new(:firstname => 'Cool',
70 existing_user = User.new(:firstname => 'Cool',
70 :lastname => 'User',
71 :lastname => 'User',
71 :mail => 'user@somedomain.com',
72 :mail => 'user@somedomain.com',
72 :identity_url => 'http://openid.example.com/good_user')
73 :identity_url => 'http://openid.example.com/good_user')
73 existing_user.login = 'cool_user'
74 existing_user.login = 'cool_user'
74 assert existing_user.save!
75 assert existing_user.save!
75
76
76 post :login, :openid_url => existing_user.identity_url
77 post :login, :openid_url => existing_user.identity_url
77 assert_redirected_to 'my/page'
78 assert_redirected_to 'my/page'
78 end
79 end
79
80
80 def test_login_with_openid_with_new_user_created
81 def test_login_with_openid_with_new_user_created
81 Setting.self_registration = '3'
82 Setting.self_registration = '3'
83 Setting.openid = '1'
82 post :login, :openid_url => 'http://openid.example.com/good_user'
84 post :login, :openid_url => 'http://openid.example.com/good_user'
83 assert_redirected_to 'my/account'
85 assert_redirected_to 'my/account'
84 user = User.find_by_login('cool_user')
86 user = User.find_by_login('cool_user')
85 assert user
87 assert user
86 assert_equal 'Cool', user.firstname
88 assert_equal 'Cool', user.firstname
87 assert_equal 'User', user.lastname
89 assert_equal 'User', user.lastname
88 end
90 end
89
91
90 def test_login_with_openid_with_new_user_and_self_registration_off
92 def test_login_with_openid_with_new_user_and_self_registration_off
91 Setting.self_registration = '0'
93 Setting.self_registration = '0'
94 Setting.openid = '1'
92 post :login, :openid_url => 'http://openid.example.com/good_user'
95 post :login, :openid_url => 'http://openid.example.com/good_user'
93 assert_redirected_to home_url
96 assert_redirected_to home_url
94 user = User.find_by_login('cool_user')
97 user = User.find_by_login('cool_user')
95 assert ! user
98 assert ! user
96 end
99 end
97
100
98 def test_login_with_openid_with_new_user_created_with_email_activation_should_have_a_token
101 def test_login_with_openid_with_new_user_created_with_email_activation_should_have_a_token
99 Setting.self_registration = '1'
102 Setting.self_registration = '1'
103 Setting.openid = '1'
100 post :login, :openid_url => 'http://openid.example.com/good_user'
104 post :login, :openid_url => 'http://openid.example.com/good_user'
101 assert_redirected_to 'login'
105 assert_redirected_to 'login'
102 user = User.find_by_login('cool_user')
106 user = User.find_by_login('cool_user')
103 assert user
107 assert user
104
108
105 token = Token.find_by_user_id_and_action(user.id, 'register')
109 token = Token.find_by_user_id_and_action(user.id, 'register')
106 assert token
110 assert token
107 end
111 end
108
112
109 def test_login_with_openid_with_new_user_created_with_manual_activation
113 def test_login_with_openid_with_new_user_created_with_manual_activation
110 Setting.self_registration = '2'
114 Setting.self_registration = '2'
115 Setting.openid = '1'
111 post :login, :openid_url => 'http://openid.example.com/good_user'
116 post :login, :openid_url => 'http://openid.example.com/good_user'
112 assert_redirected_to 'login'
117 assert_redirected_to 'login'
113 user = User.find_by_login('cool_user')
118 user = User.find_by_login('cool_user')
114 assert user
119 assert user
115 assert_equal User::STATUS_REGISTERED, user.status
120 assert_equal User::STATUS_REGISTERED, user.status
116 end
121 end
117
122
118 def test_login_with_openid_with_new_user_with_conflict_should_register
123 def test_login_with_openid_with_new_user_with_conflict_should_register
119 Setting.self_registration = '3'
124 Setting.self_registration = '3'
125 Setting.openid = '1'
120 existing_user = User.new(:firstname => 'Cool', :lastname => 'User', :mail => 'user@somedomain.com')
126 existing_user = User.new(:firstname => 'Cool', :lastname => 'User', :mail => 'user@somedomain.com')
121 existing_user.login = 'cool_user'
127 existing_user.login = 'cool_user'
122 assert existing_user.save!
128 assert existing_user.save!
123
129
124 post :login, :openid_url => 'http://openid.example.com/good_user'
130 post :login, :openid_url => 'http://openid.example.com/good_user'
125 assert_response :success
131 assert_response :success
126 assert_template 'register'
132 assert_template 'register'
127 assert assigns(:user)
133 assert assigns(:user)
128 assert_equal 'http://openid.example.com/good_user', assigns(:user)[:identity_url]
134 assert_equal 'http://openid.example.com/good_user', assigns(:user)[:identity_url]
129 end
135 end
130
136
131 def test_autologin
137 def test_autologin
132 Setting.autologin = "7"
138 Setting.autologin = "7"
133 Token.delete_all
139 Token.delete_all
134 post :login, :username => 'admin', :password => 'admin', :autologin => 1
140 post :login, :username => 'admin', :password => 'admin', :autologin => 1
135 assert_redirected_to 'my/page'
141 assert_redirected_to 'my/page'
136 token = Token.find :first
142 token = Token.find :first
137 assert_not_nil token
143 assert_not_nil token
138 assert_equal User.find_by_login('admin'), token.user
144 assert_equal User.find_by_login('admin'), token.user
139 assert_equal 'autologin', token.action
145 assert_equal 'autologin', token.action
140 end
146 end
141
147
142 def test_logout
148 def test_logout
143 @request.session[:user_id] = 2
149 @request.session[:user_id] = 2
144 get :logout
150 get :logout
145 assert_redirected_to ''
151 assert_redirected_to ''
146 assert_nil @request.session[:user_id]
152 assert_nil @request.session[:user_id]
147 end
153 end
148 end
154 end
General Comments 0
You need to be logged in to leave comments. Login now