##// END OF EJS Templates
Removes the fat ruby-openid gem. Simply use 'gem install ruby-openid' to enable openid support....
Jean-Philippe Lang -
r2397:ff9da0bab038
parent child
Show More

The requested changes are too big and content was truncated. Show full diff

@@ -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 if using_open_id? && Setting.openid?
49 if Setting.openid? && using_open_id?
50 open_id_authenticate(params[:openid_url])
50 open_id_authenticate(params[:openid_url])
51 else
51 else
52 password_authentication
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,164 +1,168
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 class Setting < ActiveRecord::Base
18 class Setting < ActiveRecord::Base
19
19
20 DATE_FORMATS = [
20 DATE_FORMATS = [
21 '%Y-%m-%d',
21 '%Y-%m-%d',
22 '%d/%m/%Y',
22 '%d/%m/%Y',
23 '%d.%m.%Y',
23 '%d.%m.%Y',
24 '%d-%m-%Y',
24 '%d-%m-%Y',
25 '%m/%d/%Y',
25 '%m/%d/%Y',
26 '%d %b %Y',
26 '%d %b %Y',
27 '%d %B %Y',
27 '%d %B %Y',
28 '%b %d, %Y',
28 '%b %d, %Y',
29 '%B %d, %Y'
29 '%B %d, %Y'
30 ]
30 ]
31
31
32 TIME_FORMATS = [
32 TIME_FORMATS = [
33 '%H:%M',
33 '%H:%M',
34 '%I:%M %p'
34 '%I:%M %p'
35 ]
35 ]
36
36
37 ENCODINGS = %w(US-ASCII
37 ENCODINGS = %w(US-ASCII
38 windows-1250
38 windows-1250
39 windows-1251
39 windows-1251
40 windows-1252
40 windows-1252
41 windows-1253
41 windows-1253
42 windows-1254
42 windows-1254
43 windows-1255
43 windows-1255
44 windows-1256
44 windows-1256
45 windows-1257
45 windows-1257
46 windows-1258
46 windows-1258
47 windows-31j
47 windows-31j
48 ISO-2022-JP
48 ISO-2022-JP
49 ISO-2022-KR
49 ISO-2022-KR
50 ISO-8859-1
50 ISO-8859-1
51 ISO-8859-2
51 ISO-8859-2
52 ISO-8859-3
52 ISO-8859-3
53 ISO-8859-4
53 ISO-8859-4
54 ISO-8859-5
54 ISO-8859-5
55 ISO-8859-6
55 ISO-8859-6
56 ISO-8859-7
56 ISO-8859-7
57 ISO-8859-8
57 ISO-8859-8
58 ISO-8859-9
58 ISO-8859-9
59 ISO-8859-13
59 ISO-8859-13
60 ISO-8859-15
60 ISO-8859-15
61 KOI8-R
61 KOI8-R
62 UTF-8
62 UTF-8
63 UTF-16
63 UTF-16
64 UTF-16BE
64 UTF-16BE
65 UTF-16LE
65 UTF-16LE
66 EUC-JP
66 EUC-JP
67 Shift_JIS
67 Shift_JIS
68 GB18030
68 GB18030
69 GBK
69 GBK
70 ISCII91
70 ISCII91
71 EUC-KR
71 EUC-KR
72 Big5
72 Big5
73 Big5-HKSCS
73 Big5-HKSCS
74 TIS-620)
74 TIS-620)
75
75
76 cattr_accessor :available_settings
76 cattr_accessor :available_settings
77 @@available_settings = YAML::load(File.open("#{RAILS_ROOT}/config/settings.yml"))
77 @@available_settings = YAML::load(File.open("#{RAILS_ROOT}/config/settings.yml"))
78 Redmine::Plugin.all.each do |plugin|
78 Redmine::Plugin.all.each do |plugin|
79 next unless plugin.settings
79 next unless plugin.settings
80 @@available_settings["plugin_#{plugin.id}"] = {'default' => plugin.settings[:default], 'serialized' => true}
80 @@available_settings["plugin_#{plugin.id}"] = {'default' => plugin.settings[:default], 'serialized' => true}
81 end
81 end
82
82
83 validates_uniqueness_of :name
83 validates_uniqueness_of :name
84 validates_inclusion_of :name, :in => @@available_settings.keys
84 validates_inclusion_of :name, :in => @@available_settings.keys
85 validates_numericality_of :value, :only_integer => true, :if => Proc.new { |setting| @@available_settings[setting.name]['format'] == 'int' }
85 validates_numericality_of :value, :only_integer => true, :if => Proc.new { |setting| @@available_settings[setting.name]['format'] == 'int' }
86
86
87 # Hash used to cache setting values
87 # Hash used to cache setting values
88 @cached_settings = {}
88 @cached_settings = {}
89 @cached_cleared_on = Time.now
89 @cached_cleared_on = Time.now
90
90
91 def value
91 def value
92 v = read_attribute(:value)
92 v = read_attribute(:value)
93 # Unserialize serialized settings
93 # Unserialize serialized settings
94 v = YAML::load(v) if @@available_settings[name]['serialized'] && v.is_a?(String)
94 v = YAML::load(v) if @@available_settings[name]['serialized'] && v.is_a?(String)
95 v = v.to_sym if @@available_settings[name]['format'] == 'symbol' && !v.blank?
95 v = v.to_sym if @@available_settings[name]['format'] == 'symbol' && !v.blank?
96 v
96 v
97 end
97 end
98
98
99 def value=(v)
99 def value=(v)
100 v = v.to_yaml if v && @@available_settings[name]['serialized']
100 v = v.to_yaml if v && @@available_settings[name]['serialized']
101 write_attribute(:value, v.to_s)
101 write_attribute(:value, v.to_s)
102 end
102 end
103
103
104 # Returns the value of the setting named name
104 # Returns the value of the setting named name
105 def self.[](name)
105 def self.[](name)
106 v = @cached_settings[name]
106 v = @cached_settings[name]
107 v ? v : (@cached_settings[name] = find_or_default(name).value)
107 v ? v : (@cached_settings[name] = find_or_default(name).value)
108 end
108 end
109
109
110 def self.[]=(name, v)
110 def self.[]=(name, v)
111 setting = find_or_default(name)
111 setting = find_or_default(name)
112 setting.value = (v ? v : "")
112 setting.value = (v ? v : "")
113 @cached_settings[name] = nil
113 @cached_settings[name] = nil
114 setting.save
114 setting.save
115 setting.value
115 setting.value
116 end
116 end
117
117
118 # Defines getter and setter for each setting
118 # Defines getter and setter for each setting
119 # Then setting values can be read using: Setting.some_setting_name
119 # Then setting values can be read using: Setting.some_setting_name
120 # or set using Setting.some_setting_name = "some value"
120 # or set using Setting.some_setting_name = "some value"
121 @@available_settings.each do |name, params|
121 @@available_settings.each do |name, params|
122 src = <<-END_SRC
122 src = <<-END_SRC
123 def self.#{name}
123 def self.#{name}
124 self[:#{name}]
124 self[:#{name}]
125 end
125 end
126
126
127 def self.#{name}?
127 def self.#{name}?
128 self[:#{name}].to_i > 0
128 self[:#{name}].to_i > 0
129 end
129 end
130
130
131 def self.#{name}=(value)
131 def self.#{name}=(value)
132 self[:#{name}] = value
132 self[:#{name}] = value
133 end
133 end
134 END_SRC
134 END_SRC
135 class_eval src, __FILE__, __LINE__
135 class_eval src, __FILE__, __LINE__
136 end
136 end
137
137
138 # Helper that returns an array based on per_page_options setting
138 # Helper that returns an array based on per_page_options setting
139 def self.per_page_options_array
139 def self.per_page_options_array
140 per_page_options.split(%r{[\s,]}).collect(&:to_i).select {|n| n > 0}.sort
140 per_page_options.split(%r{[\s,]}).collect(&:to_i).select {|n| n > 0}.sort
141 end
141 end
142
142
143 def self.openid?
144 Object.const_defined?(:OpenID) && self['openid'].to_s == '1'
145 end
146
143 # Checks if settings have changed since the values were read
147 # Checks if settings have changed since the values were read
144 # and clears the cache hash if it's the case
148 # and clears the cache hash if it's the case
145 # Called once per request
149 # Called once per request
146 def self.check_cache
150 def self.check_cache
147 settings_updated_on = Setting.maximum(:updated_on)
151 settings_updated_on = Setting.maximum(:updated_on)
148 if settings_updated_on && @cached_cleared_on <= settings_updated_on
152 if settings_updated_on && @cached_cleared_on <= settings_updated_on
149 @cached_settings.clear
153 @cached_settings.clear
150 @cached_cleared_on = Time.now
154 @cached_cleared_on = Time.now
151 logger.info "Settings cache cleared." if logger
155 logger.info "Settings cache cleared." if logger
152 end
156 end
153 end
157 end
154
158
155 private
159 private
156 # Returns the Setting instance for the setting named name
160 # Returns the Setting instance for the setting named name
157 # (record found in database or new record with default value)
161 # (record found in database or new record with default value)
158 def self.find_or_default(name)
162 def self.find_or_default(name)
159 name = name.to_s
163 name = name.to_s
160 raise "There's no setting named #{name}" unless @@available_settings.has_key?(name)
164 raise "There's no setting named #{name}" unless @@available_settings.has_key?(name)
161 setting = find_by_name(name)
165 setting = find_by_name(name)
162 setting ||= new(:name => name, :value => @@available_settings[name]['default']) if @@available_settings.has_key? name
166 setting ||= new(:name => name, :value => @@available_settings[name]['default']) if @@available_settings.has_key? name
163 end
167 end
164 end
168 end
@@ -1,30 +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
20
21 <p><label><%= l(:setting_openid) %></label>
21 <p><label><%= l(:setting_openid) %></label>
22 <%= check_box_tag 'settings[openid]', 1, Setting.openid? %><%= hidden_field_tag 'settings[openid]', 0 %></p>
22 <%= check_box_tag 'settings[openid]', 1, Setting.openid?, :disabled => !Object.const_defined?(:OpenID) %><%= hidden_field_tag 'settings[openid]', 0 %></p>
23 </div>
23 </div>
24
24
25 <div style="float:right;">
25 <div style="float:right;">
26 <%= link_to l(:label_ldap_authentication), :controller => 'auth_sources', :action => 'list' %>
26 <%= link_to l(:label_ldap_authentication), :controller => 'auth_sources', :action => 'list' %>
27 </div>
27 </div>
28
28
29 <%= submit_tag l(:button_save) %>
29 <%= submit_tag l(:button_save) %>
30 <% end %>
30 <% end %>
@@ -1,154 +1,161
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 if Object.const_defined?(:OpenID)
68
67 def test_login_with_openid_for_existing_user
69 def test_login_with_openid_for_existing_user
68 Setting.self_registration = '3'
70 Setting.self_registration = '3'
69 Setting.openid = '1'
71 Setting.openid = '1'
70 existing_user = User.new(:firstname => 'Cool',
72 existing_user = User.new(:firstname => 'Cool',
71 :lastname => 'User',
73 :lastname => 'User',
72 :mail => 'user@somedomain.com',
74 :mail => 'user@somedomain.com',
73 :identity_url => 'http://openid.example.com/good_user')
75 :identity_url => 'http://openid.example.com/good_user')
74 existing_user.login = 'cool_user'
76 existing_user.login = 'cool_user'
75 assert existing_user.save!
77 assert existing_user.save!
76
78
77 post :login, :openid_url => existing_user.identity_url
79 post :login, :openid_url => existing_user.identity_url
78 assert_redirected_to 'my/page'
80 assert_redirected_to 'my/page'
79 end
81 end
80
82
81 def test_login_with_openid_with_new_user_created
83 def test_login_with_openid_with_new_user_created
82 Setting.self_registration = '3'
84 Setting.self_registration = '3'
83 Setting.openid = '1'
85 Setting.openid = '1'
84 post :login, :openid_url => 'http://openid.example.com/good_user'
86 post :login, :openid_url => 'http://openid.example.com/good_user'
85 assert_redirected_to 'my/account'
87 assert_redirected_to 'my/account'
86 user = User.find_by_login('cool_user')
88 user = User.find_by_login('cool_user')
87 assert user
89 assert user
88 assert_equal 'Cool', user.firstname
90 assert_equal 'Cool', user.firstname
89 assert_equal 'User', user.lastname
91 assert_equal 'User', user.lastname
90 end
92 end
91
93
92 def test_login_with_openid_with_new_user_and_self_registration_off
94 def test_login_with_openid_with_new_user_and_self_registration_off
93 Setting.self_registration = '0'
95 Setting.self_registration = '0'
94 Setting.openid = '1'
96 Setting.openid = '1'
95 post :login, :openid_url => 'http://openid.example.com/good_user'
97 post :login, :openid_url => 'http://openid.example.com/good_user'
96 assert_redirected_to home_url
98 assert_redirected_to home_url
97 user = User.find_by_login('cool_user')
99 user = User.find_by_login('cool_user')
98 assert ! user
100 assert ! user
99 end
101 end
100
102
101 def test_login_with_openid_with_new_user_created_with_email_activation_should_have_a_token
103 def test_login_with_openid_with_new_user_created_with_email_activation_should_have_a_token
102 Setting.self_registration = '1'
104 Setting.self_registration = '1'
103 Setting.openid = '1'
105 Setting.openid = '1'
104 post :login, :openid_url => 'http://openid.example.com/good_user'
106 post :login, :openid_url => 'http://openid.example.com/good_user'
105 assert_redirected_to 'login'
107 assert_redirected_to 'login'
106 user = User.find_by_login('cool_user')
108 user = User.find_by_login('cool_user')
107 assert user
109 assert user
108
110
109 token = Token.find_by_user_id_and_action(user.id, 'register')
111 token = Token.find_by_user_id_and_action(user.id, 'register')
110 assert token
112 assert token
111 end
113 end
112
114
113 def test_login_with_openid_with_new_user_created_with_manual_activation
115 def test_login_with_openid_with_new_user_created_with_manual_activation
114 Setting.self_registration = '2'
116 Setting.self_registration = '2'
115 Setting.openid = '1'
117 Setting.openid = '1'
116 post :login, :openid_url => 'http://openid.example.com/good_user'
118 post :login, :openid_url => 'http://openid.example.com/good_user'
117 assert_redirected_to 'login'
119 assert_redirected_to 'login'
118 user = User.find_by_login('cool_user')
120 user = User.find_by_login('cool_user')
119 assert user
121 assert user
120 assert_equal User::STATUS_REGISTERED, user.status
122 assert_equal User::STATUS_REGISTERED, user.status
121 end
123 end
122
124
123 def test_login_with_openid_with_new_user_with_conflict_should_register
125 def test_login_with_openid_with_new_user_with_conflict_should_register
124 Setting.self_registration = '3'
126 Setting.self_registration = '3'
125 Setting.openid = '1'
127 Setting.openid = '1'
126 existing_user = User.new(:firstname => 'Cool', :lastname => 'User', :mail => 'user@somedomain.com')
128 existing_user = User.new(:firstname => 'Cool', :lastname => 'User', :mail => 'user@somedomain.com')
127 existing_user.login = 'cool_user'
129 existing_user.login = 'cool_user'
128 assert existing_user.save!
130 assert existing_user.save!
129
131
130 post :login, :openid_url => 'http://openid.example.com/good_user'
132 post :login, :openid_url => 'http://openid.example.com/good_user'
131 assert_response :success
133 assert_response :success
132 assert_template 'register'
134 assert_template 'register'
133 assert assigns(:user)
135 assert assigns(:user)
134 assert_equal 'http://openid.example.com/good_user', assigns(:user)[:identity_url]
136 assert_equal 'http://openid.example.com/good_user', assigns(:user)[:identity_url]
135 end
137 end
136
138
139 else
140 puts "Skipping openid tests."
141 end
142
143
137 def test_autologin
144 def test_autologin
138 Setting.autologin = "7"
145 Setting.autologin = "7"
139 Token.delete_all
146 Token.delete_all
140 post :login, :username => 'admin', :password => 'admin', :autologin => 1
147 post :login, :username => 'admin', :password => 'admin', :autologin => 1
141 assert_redirected_to 'my/page'
148 assert_redirected_to 'my/page'
142 token = Token.find :first
149 token = Token.find :first
143 assert_not_nil token
150 assert_not_nil token
144 assert_equal User.find_by_login('admin'), token.user
151 assert_equal User.find_by_login('admin'), token.user
145 assert_equal 'autologin', token.action
152 assert_equal 'autologin', token.action
146 end
153 end
147
154
148 def test_logout
155 def test_logout
149 @request.session[:user_id] = 2
156 @request.session[:user_id] = 2
150 get :logout
157 get :logout
151 assert_redirected_to ''
158 assert_redirected_to ''
152 assert_nil @request.session[:user_id]
159 assert_nil @request.session[:user_id]
153 end
160 end
154 end
161 end
@@ -1,206 +1,212
1 # redMine - project management software
1 # redMine - project management software
2 # Copyright (C) 2006 Jean-Philippe Lang
2 # Copyright (C) 2006 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
19
20 class UserTest < Test::Unit::TestCase
20 class UserTest < Test::Unit::TestCase
21 fixtures :users, :members, :projects
21 fixtures :users, :members, :projects
22
22
23 def setup
23 def setup
24 @admin = User.find(1)
24 @admin = User.find(1)
25 @jsmith = User.find(2)
25 @jsmith = User.find(2)
26 @dlopper = User.find(3)
26 @dlopper = User.find(3)
27 end
27 end
28
28
29 def test_truth
29 def test_truth
30 assert_kind_of User, @jsmith
30 assert_kind_of User, @jsmith
31 end
31 end
32
32
33 def test_create
33 def test_create
34 user = User.new(:firstname => "new", :lastname => "user", :mail => "newuser@somenet.foo")
34 user = User.new(:firstname => "new", :lastname => "user", :mail => "newuser@somenet.foo")
35
35
36 user.login = "jsmith"
36 user.login = "jsmith"
37 user.password, user.password_confirmation = "password", "password"
37 user.password, user.password_confirmation = "password", "password"
38 # login uniqueness
38 # login uniqueness
39 assert !user.save
39 assert !user.save
40 assert_equal 1, user.errors.count
40 assert_equal 1, user.errors.count
41
41
42 user.login = "newuser"
42 user.login = "newuser"
43 user.password, user.password_confirmation = "passwd", "password"
43 user.password, user.password_confirmation = "passwd", "password"
44 # password confirmation
44 # password confirmation
45 assert !user.save
45 assert !user.save
46 assert_equal 1, user.errors.count
46 assert_equal 1, user.errors.count
47
47
48 user.password, user.password_confirmation = "password", "password"
48 user.password, user.password_confirmation = "password", "password"
49 assert user.save
49 assert user.save
50 end
50 end
51
51
52 def test_mail_uniqueness_should_not_be_case_sensitive
52 def test_mail_uniqueness_should_not_be_case_sensitive
53 u = User.new(:firstname => "new", :lastname => "user", :mail => "newuser@somenet.foo")
53 u = User.new(:firstname => "new", :lastname => "user", :mail => "newuser@somenet.foo")
54 u.login = 'newuser1'
54 u.login = 'newuser1'
55 u.password, u.password_confirmation = "password", "password"
55 u.password, u.password_confirmation = "password", "password"
56 assert u.save
56 assert u.save
57
57
58 u = User.new(:firstname => "new", :lastname => "user", :mail => "newUser@Somenet.foo")
58 u = User.new(:firstname => "new", :lastname => "user", :mail => "newUser@Somenet.foo")
59 u.login = 'newuser2'
59 u.login = 'newuser2'
60 u.password, u.password_confirmation = "password", "password"
60 u.password, u.password_confirmation = "password", "password"
61 assert !u.save
61 assert !u.save
62 assert_equal 'activerecord_error_taken', u.errors.on(:mail)
62 assert_equal 'activerecord_error_taken', u.errors.on(:mail)
63 end
63 end
64
64
65 def test_update
65 def test_update
66 assert_equal "admin", @admin.login
66 assert_equal "admin", @admin.login
67 @admin.login = "john"
67 @admin.login = "john"
68 assert @admin.save, @admin.errors.full_messages.join("; ")
68 assert @admin.save, @admin.errors.full_messages.join("; ")
69 @admin.reload
69 @admin.reload
70 assert_equal "john", @admin.login
70 assert_equal "john", @admin.login
71 end
71 end
72
72
73 def test_destroy
73 def test_destroy
74 User.find(2).destroy
74 User.find(2).destroy
75 assert_nil User.find_by_id(2)
75 assert_nil User.find_by_id(2)
76 assert Member.find_all_by_user_id(2).empty?
76 assert Member.find_all_by_user_id(2).empty?
77 end
77 end
78
78
79 def test_validate
79 def test_validate
80 @admin.login = ""
80 @admin.login = ""
81 assert !@admin.save
81 assert !@admin.save
82 assert_equal 1, @admin.errors.count
82 assert_equal 1, @admin.errors.count
83 end
83 end
84
84
85 def test_password
85 def test_password
86 user = User.try_to_login("admin", "admin")
86 user = User.try_to_login("admin", "admin")
87 assert_kind_of User, user
87 assert_kind_of User, user
88 assert_equal "admin", user.login
88 assert_equal "admin", user.login
89 user.password = "hello"
89 user.password = "hello"
90 assert user.save
90 assert user.save
91
91
92 user = User.try_to_login("admin", "hello")
92 user = User.try_to_login("admin", "hello")
93 assert_kind_of User, user
93 assert_kind_of User, user
94 assert_equal "admin", user.login
94 assert_equal "admin", user.login
95 assert_equal User.hash_password("hello"), user.hashed_password
95 assert_equal User.hash_password("hello"), user.hashed_password
96 end
96 end
97
97
98 def test_name_format
98 def test_name_format
99 assert_equal 'Smith, John', @jsmith.name(:lastname_coma_firstname)
99 assert_equal 'Smith, John', @jsmith.name(:lastname_coma_firstname)
100 Setting.user_format = :firstname_lastname
100 Setting.user_format = :firstname_lastname
101 assert_equal 'John Smith', @jsmith.reload.name
101 assert_equal 'John Smith', @jsmith.reload.name
102 Setting.user_format = :username
102 Setting.user_format = :username
103 assert_equal 'jsmith', @jsmith.reload.name
103 assert_equal 'jsmith', @jsmith.reload.name
104 end
104 end
105
105
106 def test_lock
106 def test_lock
107 user = User.try_to_login("jsmith", "jsmith")
107 user = User.try_to_login("jsmith", "jsmith")
108 assert_equal @jsmith, user
108 assert_equal @jsmith, user
109
109
110 @jsmith.status = User::STATUS_LOCKED
110 @jsmith.status = User::STATUS_LOCKED
111 assert @jsmith.save
111 assert @jsmith.save
112
112
113 user = User.try_to_login("jsmith", "jsmith")
113 user = User.try_to_login("jsmith", "jsmith")
114 assert_equal nil, user
114 assert_equal nil, user
115 end
115 end
116
116
117 def test_create_anonymous
117 def test_create_anonymous
118 AnonymousUser.delete_all
118 AnonymousUser.delete_all
119 anon = User.anonymous
119 anon = User.anonymous
120 assert !anon.new_record?
120 assert !anon.new_record?
121 assert_kind_of AnonymousUser, anon
121 assert_kind_of AnonymousUser, anon
122 end
122 end
123
123
124 def test_rss_key
124 def test_rss_key
125 assert_nil @jsmith.rss_token
125 assert_nil @jsmith.rss_token
126 key = @jsmith.rss_key
126 key = @jsmith.rss_key
127 assert_equal 40, key.length
127 assert_equal 40, key.length
128
128
129 @jsmith.reload
129 @jsmith.reload
130 assert_equal key, @jsmith.rss_key
130 assert_equal key, @jsmith.rss_key
131 end
131 end
132
132
133 def test_role_for_project
133 def test_role_for_project
134 # user with a role
134 # user with a role
135 role = @jsmith.role_for_project(Project.find(1))
135 role = @jsmith.role_for_project(Project.find(1))
136 assert_kind_of Role, role
136 assert_kind_of Role, role
137 assert_equal "Manager", role.name
137 assert_equal "Manager", role.name
138
138
139 # user with no role
139 # user with no role
140 assert !@dlopper.role_for_project(Project.find(2)).member?
140 assert !@dlopper.role_for_project(Project.find(2)).member?
141 end
141 end
142
142
143 def test_mail_notification_all
143 def test_mail_notification_all
144 @jsmith.mail_notification = true
144 @jsmith.mail_notification = true
145 @jsmith.notified_project_ids = []
145 @jsmith.notified_project_ids = []
146 @jsmith.save
146 @jsmith.save
147 @jsmith.reload
147 @jsmith.reload
148 assert @jsmith.projects.first.recipients.include?(@jsmith.mail)
148 assert @jsmith.projects.first.recipients.include?(@jsmith.mail)
149 end
149 end
150
150
151 def test_mail_notification_selected
151 def test_mail_notification_selected
152 @jsmith.mail_notification = false
152 @jsmith.mail_notification = false
153 @jsmith.notified_project_ids = [1]
153 @jsmith.notified_project_ids = [1]
154 @jsmith.save
154 @jsmith.save
155 @jsmith.reload
155 @jsmith.reload
156 assert Project.find(1).recipients.include?(@jsmith.mail)
156 assert Project.find(1).recipients.include?(@jsmith.mail)
157 end
157 end
158
158
159 def test_mail_notification_none
159 def test_mail_notification_none
160 @jsmith.mail_notification = false
160 @jsmith.mail_notification = false
161 @jsmith.notified_project_ids = []
161 @jsmith.notified_project_ids = []
162 @jsmith.save
162 @jsmith.save
163 @jsmith.reload
163 @jsmith.reload
164 assert !@jsmith.projects.first.recipients.include?(@jsmith.mail)
164 assert !@jsmith.projects.first.recipients.include?(@jsmith.mail)
165 end
165 end
166
166
167 def test_comments_sorting_preference
167 def test_comments_sorting_preference
168 assert !@jsmith.wants_comments_in_reverse_order?
168 assert !@jsmith.wants_comments_in_reverse_order?
169 @jsmith.pref.comments_sorting = 'asc'
169 @jsmith.pref.comments_sorting = 'asc'
170 assert !@jsmith.wants_comments_in_reverse_order?
170 assert !@jsmith.wants_comments_in_reverse_order?
171 @jsmith.pref.comments_sorting = 'desc'
171 @jsmith.pref.comments_sorting = 'desc'
172 assert @jsmith.wants_comments_in_reverse_order?
172 assert @jsmith.wants_comments_in_reverse_order?
173 end
173 end
174
174
175 def test_find_by_mail_should_be_case_insensitive
175 def test_find_by_mail_should_be_case_insensitive
176 u = User.find_by_mail('JSmith@somenet.foo')
176 u = User.find_by_mail('JSmith@somenet.foo')
177 assert_not_nil u
177 assert_not_nil u
178 assert_equal 'jsmith@somenet.foo', u.mail
178 assert_equal 'jsmith@somenet.foo', u.mail
179 end
179 end
180
180
181 def test_random_password
181 def test_random_password
182 u = User.new
182 u = User.new
183 u.random_password
183 u.random_password
184 assert !u.password.blank?
184 assert !u.password.blank?
185 assert !u.password_confirmation.blank?
185 assert !u.password_confirmation.blank?
186 end
186 end
187
187
188 if Object.const_defined?(:OpenID)
189
188 def test_setting_identity_url
190 def test_setting_identity_url
189 normalized_open_id_url = 'http://example.com/'
191 normalized_open_id_url = 'http://example.com/'
190 u = User.new( :identity_url => 'http://example.com/' )
192 u = User.new( :identity_url => 'http://example.com/' )
191 assert_equal normalized_open_id_url, u.identity_url
193 assert_equal normalized_open_id_url, u.identity_url
192 end
194 end
193
195
194 def test_setting_identity_url_without_trailing_slash
196 def test_setting_identity_url_without_trailing_slash
195 normalized_open_id_url = 'http://example.com/'
197 normalized_open_id_url = 'http://example.com/'
196 u = User.new( :identity_url => 'http://example.com' )
198 u = User.new( :identity_url => 'http://example.com' )
197 assert_equal normalized_open_id_url, u.identity_url
199 assert_equal normalized_open_id_url, u.identity_url
198 end
200 end
199
201
200 def test_setting_identity_url_without_protocol
202 def test_setting_identity_url_without_protocol
201 normalized_open_id_url = 'http://example.com/'
203 normalized_open_id_url = 'http://example.com/'
202 u = User.new( :identity_url => 'example.com' )
204 u = User.new( :identity_url => 'example.com' )
203 assert_equal normalized_open_id_url, u.identity_url
205 assert_equal normalized_open_id_url, u.identity_url
204 end
206 end
205
207
208 else
209 puts "Skipping openid tests."
210 end
211
206 end
212 end
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed, binary diff hidden
NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed
NO CONTENT: file was removed
This diff has been collapsed as it changes many lines, (750 lines changed) Show them Hide them
1 NO CONTENT: file was removed
NO CONTENT: file was removed
This diff has been collapsed as it changes many lines, (584 lines changed) Show them Hide them
1 NO CONTENT: file was removed
NO CONTENT: file was removed
This diff has been collapsed as it changes many lines, (854 lines changed) Show them Hide them
1 NO CONTENT: file was removed
NO CONTENT: file was removed
This diff has been collapsed as it changes many lines, (1785 lines changed) Show them Hide them
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
This diff has been collapsed as it changes many lines, (523 lines changed) Show them Hide them
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
This diff has been collapsed as it changes many lines, (516 lines changed) Show them Hide them
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
This diff has been collapsed as it changes many lines, (553 lines changed) Show them Hide them
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
This diff has been collapsed as it changes many lines, (1544 lines changed) Show them Hide them
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
General Comments 0
You need to be logged in to leave comments. Login now