Go MAEDA
74a6ff0230
Replace pluck().first with pick() (#32909).
Patch by Pavel Rosický and Marius BALTEANU.
git-svn-id: http://svn.redmine.org/redmine/trunk@20907 e93f8b46-1217-0410-a6f0-8f06a7374b81
3 years ago
Go MAEDA
3e36b5c452
Update copyright year in source files to 2021 (#33069).
git-svn-id: http://svn.redmine.org/redmine/trunk@20846 e93f8b46-1217-0410-a6f0-8f06a7374b81
3 years ago
Go MAEDA
1dcebf8ce0
Changes User.try_to_login to catch and log AuthSourceExceptions, and introduces User.try_to_login! replicating the original behavior (#34071).
Patch by Jens Krämer.
git-svn-id: http://svn.redmine.org/redmine/trunk@20547 e93f8b46-1217-0410-a6f0-8f06a7374b81
3 years ago
Toshi MARUYAMA
b2e81eecf2
use "do end" instead of {} at ActiveRecord scope lambda of app/models/user.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20318 e93f8b46-1217-0410-a6f0-8f06a7374b81
3 years ago
Toshi MARUYAMA
691964695f
fix source indent of app/models/user.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20037 e93f8b46-1217-0410-a6f0-8f06a7374b81
3 years ago
Go MAEDA
be7f5e21fa
Adds a setting to disable/enable/require 2fa auth (#1237).
Patch by Felix Schäfer.
git-svn-id: http://svn.redmine.org/redmine/trunk@19989 e93f8b46-1217-0410-a6f0-8f06a7374b81
3 years ago
Go MAEDA
560bca344a
Adds two factor authentication support (#1237).
Patch by Felix Schäfer.
git-svn-id: http://svn.redmine.org/redmine/trunk@19988 e93f8b46-1217-0410-a6f0-8f06a7374b81
3 years ago
Toshi MARUYAMA
de3fcfe63e
use "do end" instead of {} at app/models/user.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@19973 e93f8b46-1217-0410-a6f0-8f06a7374b81
3 years ago
Toshi MARUYAMA
3d6d4c5a12
remove spaces inside {} of app/models/user.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@19922 e93f8b46-1217-0410-a6f0-8f06a7374b81
3 years ago
Toshi MARUYAMA
4ef5949574
fix source indent of app/models/user.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@19903 e93f8b46-1217-0410-a6f0-8f06a7374b81
3 years ago
Toshi MARUYAMA
8402e08034
remove spaces inside {} of app/models/user.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@19879 e93f8b46-1217-0410-a6f0-8f06a7374b81
3 years ago
Toshi MARUYAMA
dcf3a07892
add empty lines after guard clause to app/models/user.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@19871 e93f8b46-1217-0410-a6f0-8f06a7374b81
3 years ago
Go MAEDA
907e0173e4
Update copyright year in source files to 2020 (#33069).
git-svn-id: http://svn.redmine.org/redmine/trunk@19553 e93f8b46-1217-0410-a6f0-8f06a7374b81
4 years ago
Go MAEDA
01f523f165
Rails 6: Fix deprecation warning "Class level methods will no longer inherit scoping" (#32911).
Patch by Pavel Rosický.
git-svn-id: http://svn.redmine.org/redmine/trunk@19490 e93f8b46-1217-0410-a6f0-8f06a7374b81
4 years ago
Go MAEDA
d48769f152
Enable users to receive email notifications about high issues (only) (#32628).
Patch by Jan Schulz-Hofen.
git-svn-id: http://svn.redmine.org/redmine/trunk@19449 e93f8b46-1217-0410-a6f0-8f06a7374b81
4 years ago
Toshi MARUYAMA
5f2b2c9436
code layout clean up app/models/user.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@19297 e93f8b46-1217-0410-a6f0-8f06a7374b81
4 years ago
Toshi MARUYAMA
d9435cf2f6
cleanup: rubocop: fix Layout/AlignArguments in app/models/user.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18939 e93f8b46-1217-0410-a6f0-8f06a7374b81
4 years ago
Go MAEDA
b1f1108606
Option to filter after my bookmarked projects (#32302, #29482, #31355).
Patch by Marius BALTEANU.
git-svn-id: http://svn.redmine.org/redmine/trunk@18842 e93f8b46-1217-0410-a6f0-8f06a7374b81
4 years ago
Toshi MARUYAMA
fd7675adf2
code cleanup: rubocop: fix Lint/IneffectiveAccessModifier in app/models/user.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18779 e93f8b46-1217-0410-a6f0-8f06a7374b81
4 years ago
Go MAEDA
35e6a532f5
Force passwords to contain specified character classes (#4221).
Patch by Takenori TAKAKI.
git-svn-id: http://svn.redmine.org/redmine/trunk@18411 e93f8b46-1217-0410-a6f0-8f06a7374b81
4 years ago
Go MAEDA
331dcfbadc
Code cleanup: RuboCop: Fix Style/RedundantReturn in app/models/user.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18394 e93f8b46-1217-0410-a6f0-8f06a7374b81
4 years ago
Jean-Philippe Lang
001853ef79
Groups are incorrect when grouping by date without user timezone set.
git-svn-id: http://svn.redmine.org/redmine/trunk@18264 e93f8b46-1217-0410-a6f0-8f06a7374b81
5 years ago
Go MAEDA
4082069c75
Update copyright year.
git-svn-id: http://svn.redmine.org/redmine/trunk@18198 e93f8b46-1217-0410-a6f0-8f06a7374b81
5 years ago
Go MAEDA
bd5977d97e
Support frozen_string_literal in app/**/*.rb (#26561).
Contributed by Pavel Rosický.
git-svn-id: http://svn.redmine.org/redmine/trunk@17987 e93f8b46-1217-0410-a6f0-8f06a7374b81
5 years ago
Go MAEDA
5861160ffc
Add "frozen_string_literal: false" for all files (#26561).
This will be changed to true in the future.
git-svn-id: http://svn.redmine.org/redmine/trunk@17947 e93f8b46-1217-0410-a6f0-8f06a7374b81
5 years ago
Jean-Philippe Lang
0c78056a69
Send emails asynchronously (#26791).
Custom async_* delivery methods are removed in favor of ActiveJob (Async by default).
git-svn-id: http://svn.redmine.org/redmine/trunk@17588 e93f8b46-1217-0410-a6f0-8f06a7374b81
5 years ago
Go MAEDA
e159928e6b
Use find_by instead of where.first to remove unnecessary sorting (#26747).
Patch by Yuichi HARADA.
git-svn-id: http://svn.redmine.org/redmine/trunk@17586 e93f8b46-1217-0410-a6f0-8f06a7374b81
5 years ago
Jean-Philippe Lang
438d2f65fd
Update User#last_login_on only once per minute and user to reduce DB lock contention on users table (#28952).
Patch by Holger Just.
git-svn-id: http://svn.redmine.org/redmine/trunk@17403 e93f8b46-1217-0410-a6f0-8f06a7374b81
6 years ago
Go MAEDA
b4d3715dc0
Include locked members in filters (#15201).
Patch by Marius BALTEANU.
git-svn-id: http://svn.redmine.org/redmine/trunk@17371 e93f8b46-1217-0410-a6f0-8f06a7374b81
6 years ago
Go MAEDA
43d9bea7c5
/users API accepts boolean strings for generate_password field (#28686).
Patch by Gregor Schmidt.
git-svn-id: http://svn.redmine.org/redmine/trunk@17327 e93f8b46-1217-0410-a6f0-8f06a7374b81
6 years ago
Go MAEDA
a4931262d0
Strip whitespace from login on login page (#22532).
Patch by Artur Borisovich and Marius BALTEANU.
git-svn-id: http://svn.redmine.org/redmine/trunk@17113 e93f8b46-1217-0410-a6f0-8f06a7374b81
6 years ago
Jean-Philippe Lang
d74f0bfd5c
Merged rails-5.1 branch (#23630).
git-svn-id: http://svn.redmine.org/redmine/trunk@16859 e93f8b46-1217-0410-a6f0-8f06a7374b81
6 years ago
Jean-Philippe Lang
92ca57e938
Fixed User#project_ids_by_role when first called within chained scopes (#26376).
git-svn-id: http://svn.redmine.org/redmine/trunk@16767 e93f8b46-1217-0410-a6f0-8f06a7374b81
6 years ago
Jean-Philippe Lang
7fd04e1f8d
Update copyright.
git-svn-id: http://svn.redmine.org/redmine/trunk@16685 e93f8b46-1217-0410-a6f0-8f06a7374b81
7 years ago
Jean-Philippe Lang
58dc4455cb
AR uniq deprecated in Rails 5.
git-svn-id: http://svn.redmine.org/redmine/trunk@16598 e93f8b46-1217-0410-a6f0-8f06a7374b81
7 years ago
Toshi MARUYAMA
e45e29eb96
remove trailing white-space from app/models/user.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@16544 e93f8b46-1217-0410-a6f0-8f06a7374b81
7 years ago
Jean-Philippe Lang
b9ee00a8c8
Adds methods to User model to handle tokens.
git-svn-id: http://svn.redmine.org/redmine/trunk@16474 e93f8b46-1217-0410-a6f0-8f06a7374b81
7 years ago
Jean-Philippe Lang
1ab58b6aa5
Adds a User.admin scope (#25416).
git-svn-id: http://svn.redmine.org/redmine/trunk@16449 e93f8b46-1217-0410-a6f0-8f06a7374b81
7 years ago
Jean-Philippe Lang
eef5023886
Don't destructively insert builtin_role into roles (#23519).
git-svn-id: http://svn.redmine.org/redmine/trunk@16155 e93f8b46-1217-0410-a6f0-8f06a7374b81
7 years ago
Jean-Philippe Lang
34a933a580
Reset #roles on reload (#23519).
git-svn-id: http://svn.redmine.org/redmine/trunk@16154 e93f8b46-1217-0410-a6f0-8f06a7374b81
7 years ago
Jean-Philippe Lang
3deb70d4aa
Don't preload projects and roles on Principal#memberships association (#23519).
Patch by Ondřej Ezr.
git-svn-id: http://svn.redmine.org/redmine/trunk@16153 e93f8b46-1217-0410-a6f0-8f06a7374b81
7 years ago
Jean-Philippe Lang
98f8a17851
Speeds up Project.allowed_to_condition for users who belong to hundreds of projects.
git-svn-id: http://svn.redmine.org/redmine/trunk@16124 e93f8b46-1217-0410-a6f0-8f06a7374b81
7 years ago
Toshi MARUYAMA
7fb2beebc1
remove training white space from app/models/user.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@16075 e93f8b46-1217-0410-a6f0-8f06a7374b81
7 years ago
Jean-Philippe Lang
3e86a2ab52
Use .unscoped when querying and creating builtin objects (#24156).
Patch by Holger Just.
git-svn-id: http://svn.redmine.org/redmine/trunk@16049 e93f8b46-1217-0410-a6f0-8f06a7374b81
7 years ago
Jean-Philippe Lang
7b3f2b51c0
Add length validations for string fields (#24283).
Patch by Felix Schäfer.
git-svn-id: http://svn.redmine.org/redmine/trunk@15989 e93f8b46-1217-0410-a6f0-8f06a7374b81
7 years ago
Jean-Philippe Lang
c55dd52b07
Handle admin and login with safe_attributes.
git-svn-id: http://svn.redmine.org/redmine/trunk@15663 e93f8b46-1217-0410-a6f0-8f06a7374b81
7 years ago
Jean-Philippe Lang
26c5459de7
Don't pass conditions to #delete_all.
git-svn-id: http://svn.redmine.org/redmine/trunk@15662 e93f8b46-1217-0410-a6f0-8f06a7374b81
7 years ago
Jean-Philippe Lang
d2f7e31951
Use .distinct instead of .uniq.
git-svn-id: http://svn.redmine.org/redmine/trunk@15654 e93f8b46-1217-0410-a6f0-8f06a7374b81
7 years ago
Jean-Philippe Lang
f2a5804f4e
Simplify User#today (#22320).
Patch by Jens Kraemer.
git-svn-id: http://svn.redmine.org/redmine/trunk@15383 e93f8b46-1217-0410-a6f0-8f06a7374b81
8 years ago
Jean-Philippe Lang
ed50d42210
Replace Date.today with User.current.today (#22320).
Depending on the offset between a user's configured timezone and the server
timezone, Date.today may be more or less often wrong from the user's
perspective, leading to things like issues marked as overdue too early or too
late, or yesterday / tomorrow being displayed / selected where 'today' is
intended.
A test case illustrating the problem with Issue#overdue? is included
Patch by Jens Kraemer.
git-svn-id: http://svn.redmine.org/redmine/trunk@15379 e93f8b46-1217-0410-a6f0-8f06a7374b81
8 years ago