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