Commit Graph

148 Commits

Author SHA1 Message Date
Jean-Philippe Lang 9e0723c11b Refactors methods for searching a user by token.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11296 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-02-02 08:46:58 +00:00
Jean-Philippe Lang 9bf98bce26 Skip callbacks when updating last_login_on.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11294 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-02-01 18:32:12 +00:00
Jean-Philippe Lang 134b66cb29 Always notify project members about news unless they turned off all notifications (#4700).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11271 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-01-26 18:07:57 +00:00
Jean-Philippe Lang e53a5de918 Adds "sorted" scope to Principal and User and sort users/groups properly.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11259 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-01-23 17:44:28 +00:00
Jean-Philippe Lang 5741d007f6 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11222 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-01-20 13:57:29 +00:00
Jean-Philippe Lang e396a0eebe Copyright for 2013 (#12788).
Patch by Daniel Felix.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11169 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-01-12 09:29:31 +00:00
Jean-Philippe Lang 147e7a8d61 Use \A and \z in validation regexps.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10960 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-12-08 10:59:31 +00:00
Jean-Philippe Lang df0b91e238 Moved user status constants to Principal model.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10958 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-12-08 10:44:42 +00:00
Jean-Philippe Lang 7222e4012d Rewrites named scopes with ARel queries.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10950 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-12-07 17:59:20 +00:00
Jean-Baptiste Barth 4896d5c7e8 Use lambda form in model scopes (#12499)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10949 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-12-07 10:12:47 +00:00
Jean-Philippe Lang 31c33f462d Replaces find(:first) calls.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10928 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-12-03 18:21:32 +00:00
Jean-Philippe Lang 9507b448b2 Makes User.current thread safe (#12097).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10911 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-12-02 18:15:46 +00:00
Jean-Philippe Lang 6c0f3cd5d4 Validate email only if changed.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10883 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-11-27 19:25:56 +00:00
Jean-Philippe Lang 04dcdb3290 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10882 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-11-27 19:24:22 +00:00
Jean-Philippe Lang 457f0bb337 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10881 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-11-27 19:21:21 +00:00
Jean-Philippe Lang 399223daba New user name format: firstname + first letter of lastname (#12085).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10770 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-10-30 08:40:12 +00:00
Jean-Philippe Lang 7729178d9d Adds links to locked users when current user is admin.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10673 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-10-18 17:08:42 +00:00
Jean-Philippe Lang 8358dc1cc5 Fixed that User#allowed_to? should return true or false (#12078).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10614 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-10-12 09:12:03 +00:00
Toshi MARUYAMA a29854707b add new user format "lastname" (#10937)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10543 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-10-01 07:08:04 +00:00
Toshi MARUYAMA de0e0f09a3 pin user format order at setting panel (#10937)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10542 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-10-01 07:07:49 +00:00
Jean-Philippe Lang d33fa1f8c8 Do not build a projects_by_role Hash that gets updated when accessing a key that is not present (#11662).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10242 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-27 10:11:20 +00:00
Jean-Philippe Lang 962134ab4f Prevent "Overwriting existing method User.active" warning, scope is already defined on the base class (#11545).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10160 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-07 16:14:24 +00:00
Jean-Philippe Lang bd927eea88 Perf: don't load preferences for the anonymous user.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9917 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-05 13:05:11 +00:00
Jean-Philippe Lang 2ceb6b8230 Moved logic relative to project status from User to Project model (#3640).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9886 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-25 18:44:25 +00:00
Jean-Philippe Lang ac56c0c99c Ability to close projects (read-only) (#3640).
A new permission (Close/reopen project) is available to give non-admin users the ability to close their projects.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9883 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-25 17:49:35 +00:00
Jean-Philippe Lang 4d12bea397 Make sure we look for a feeds token.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9801 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-10 13:29:47 +00:00
Jean-Philippe Lang 490bfc2934 Stringify tokens.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9800 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-10 13:27:51 +00:00
Jean-Philippe Lang c47293edb1 Stringify User.try_to_login arguments.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9799 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-10 13:24:28 +00:00
Jean-Philippe Lang 189be55235 Fixed time zone issues introduced by r9719 (#10996).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9726 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-26 12:07:56 +00:00
Jean-Philippe Lang ba5a052c8c Copyright update.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9636 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-05 12:56:53 +00:00
Toshi MARUYAMA d0d01d4e70 model: replace Rails2 "named_scope" to Rails3 "scope"
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9537 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-26 23:51:10 +00:00
Jean-Philippe Lang b0f35a3cde Fixed that users with different case logins cannot update their accounts (#10711).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9449 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-19 08:42:07 +00:00
Jean-Philippe Lang 24c361eb0a Fixed that rss key is generated twice when user is not reloaded (#10668).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9419 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-15 15:34:14 +00:00
Jean-Philippe Lang 28f0c4f131 Adds the ability for users to delete their own account (#10664). Can be disabled in application settings.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9417 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-15 14:31:54 +00:00
Jean-Philippe Lang 269e9057dd Fixed that "Default administrator account changed" is always true (#10622).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9379 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-09 15:53:48 +00:00
Jean-Philippe Lang af75583b23 Adds Redmine::Utils.random_hex for generating a random hex string.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9071 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-03-04 11:05:02 +00:00
Jean-Philippe Lang e1d1a3a0c2 Fixes r9029.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9030 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-02-28 06:27:23 +00:00
Jean-Philippe Lang df3c2466f8 Implements the behaviour expected in user_test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9029 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-02-28 05:46:33 +00:00
Jean-Philippe Lang 008557581d Makes user autocompleters work with firstname and lastname.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8875 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-02-14 16:29:48 +00:00
Jean-Philippe Lang a00f04886f Increase username length limit from 30 to 60 (#2719).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8778 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-02-05 11:50:53 +00:00
Jean-Philippe Lang 22317105f9 Notify previous assignee when assignee changes (#2694).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8695 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-01-23 17:55:29 +00:00
Toshi MARUYAMA 16e8818d9e remove trailing white-spaces from app/models/user.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8296 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-12-19 04:41:13 +00:00
Jean-Philippe Lang f5987a5ca0 Use validation callback.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8293 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-12-18 15:48:06 +00:00
Toshi MARUYAMA 312ffe43c7 Rails3: model: user: use ::Query instead of Query
Test fails on Rails 3.0.

<pre>
Error:
test_destroy_should_update_wiki_contents(UserTest):
NoMethodError: undefined method `delete_all' for ActiveRecord::AttributeMethods::Query:Module
    app/models/user.rb:602:in `remove_references_before_destroy'
    test/unit/user_test.rb:298:in `test_destroy_should_update_wiki_contents'
</pre>

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8140 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-12-09 12:08:58 +00:00
Jean-Philippe Lang f52410be19 Adds named scopes for users index.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8081 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-12-04 22:24:33 +00:00
Jean-Philippe Lang 5a1fcf826f Sort the issue list by author/assignee according to user display format (#9669).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7938 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-11-26 17:37:20 +00:00
Toshi MARUYAMA d986a35a9b Rails3: model: replace deprecated errors.add_to_base at validate_on_create of User
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7608 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-10-07 12:25:20 +00:00
Toshi MARUYAMA 7e017e6c2c Rails3: model: replace deprecated 'validate' method at User model
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7431 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-09-21 06:14:11 +00:00
Toshi MARUYAMA 507192f167 Rails3: replace deprecated 'before_save' method at User model.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6923 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-08-31 16:06:36 +00:00
Toshi MARUYAMA 17ec2a289f Rails3: replace deprecated 'before_create' method at User model.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6843 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-08-31 06:06:43 +00:00