summaryrefslogtreecommitdiffstats
path: root/app/models/user.rb
Commit message (Collapse)AuthorAgeFilesLines
* Adds methods to User model to handle tokens.Jean-Philippe Lang2017-04-041-0/+14
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@16474 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Adds a User.admin scope (#25416).Jean-Philippe Lang2017-04-031-1/+5
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@16449 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Don't destructively insert builtin_role into roles (#23519).Jean-Philippe Lang2017-01-071-3/+2
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@16155 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Reset #roles on reload (#23519).Jean-Philippe Lang2017-01-071-0/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@16154 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Don't preload projects and roles on Principal#memberships association (#23519).Jean-Philippe Lang2017-01-071-3/+7
| | | | | | Patch by Ondřej Ezr. git-svn-id: http://svn.redmine.org/redmine/trunk@16153 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Speeds up Project.allowed_to_condition for users who belong to hundreds of ↵Jean-Philippe Lang2017-01-031-18/+37
| | | | | | projects. git-svn-id: http://svn.redmine.org/redmine/trunk@16124 e93f8b46-1217-0410-a6f0-8f06a7374b81
* remove training white space from app/models/user.rbToshi MARUYAMA2016-12-141-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@16075 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Use .unscoped when querying and creating builtin objects (#24156).Jean-Philippe Lang2016-12-031-2/+2
| | | | | | Patch by Holger Just. git-svn-id: http://svn.redmine.org/redmine/trunk@16049 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Add length validations for string fields (#24283).Jean-Philippe Lang2016-11-191-0/+1
| | | | | | Patch by Felix Schäfer. git-svn-id: http://svn.redmine.org/redmine/trunk@15989 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Handle admin and login with safe_attributes.Jean-Philippe Lang2016-07-141-1/+6
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@15663 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Don't pass conditions to #delete_all.Jean-Philippe Lang2016-07-141-3/+3
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@15662 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Use .distinct instead of .uniq.Jean-Philippe Lang2016-07-141-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@15654 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Simplify User#today (#22320).Jean-Philippe Lang2016-05-071-2/+1
| | | | | | Patch by Jens Kraemer. git-svn-id: http://svn.redmine.org/redmine/trunk@15383 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Replace Date.today with User.current.today (#22320).Jean-Philippe Lang2016-05-071-0/+1
| | | | | | | | | | | | | | 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
* Validate status of users and groups.Jean-Philippe Lang2016-04-111-0/+4
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@15320 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Send a single email to admins like other notifications (#21421).Jean-Philippe Lang2016-03-201-4/+6
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@15266 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Send a security notification when users gain or loose admin (#21421).Jean-Philippe Lang2016-03-201-1/+30
| | | | | | Patch by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@15265 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Updates copyright for 2016.Jean-Philippe Lang2016-03-131-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@15238 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Security notifications when password or email adress is changed (#21421).Jean-Philippe Lang2016-02-051-0/+2
| | | | | | Patch by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@15145 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Additional option for USER_FORMAT, #{lastname}#{firstname} without any ↵Jean-Philippe Lang2016-01-301-3/+8
| | | | | | | | sperator (#3551). Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@15133 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Performance in User#roles_for_project (#21582).Jean-Philippe Lang2016-01-161-1/+1
| | | | | | Patch by by Ondřej Ezr. git-svn-id: http://svn.redmine.org/redmine/trunk@15060 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Keep track of valid user sessions (#21058).Jean-Philippe Lang2015-10-241-2/+22
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@14735 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Typo "coma" (#20551).Jean-Philippe Lang2015-10-201-1/+1
| | | | | | Patch by budo kaiman. git-svn-id: http://svn.redmine.org/redmine/trunk@14712 e93f8b46-1217-0410-a6f0-8f06a7374b81
* WARNING: Can't mass-assign protected attributes for User (#20490).Jean-Philippe Lang2015-09-121-2/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@14550 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Prevent roles loading on each call to User#managed_roles for admins.Jean-Philippe Lang2015-06-171-1/+2
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@14328 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Ability to limit member management to certain roles (#19707).Jean-Philippe Lang2015-05-311-0/+9
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@14293 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Column 'address' in where clause may be ambiguous (#19485).Jean-Philippe Lang2015-05-301-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@14284 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Adds a role setting that viewing all or own time entries (#8929).Jean-Philippe Lang2015-05-301-0/+6
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@14275 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Test broken by r14265 (#19458).Jean-Philippe Lang2015-05-101-1/+2
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@14266 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Code cleanup (#19458).Jean-Philippe Lang2015-05-101-4/+3
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@14265 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Add the ability to expire passwords after a configurable number of days ↵Jean-Philippe Lang2015-05-101-1/+12
| | | | | | | | (#19458). Patch by Holger Just and Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@14264 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Workaround for timestamps rounding issues with Rails4.2 and mysql5.7 that ↵Jean-Philippe Lang2015-02-151-1/+1
| | | | | | may kill user session after password is changed (#17460). git-svn-id: http://svn.redmine.org/redmine/trunk@14011 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Add support for multiple email addresses per user (#4244).Jean-Philippe Lang2015-01-171-13/+41
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@13886 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Copyright update.Jean-Philippe Lang2015-01-111-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@13872 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Selected projects in email notifications on "my account" are lost when the ↵Jean-Philippe Lang2014-11-221-1/+1
| | | | | | | | page is redisplayed after a validation error (#18060). Patch by Felix Schäfer. git-svn-id: http://svn.redmine.org/redmine/trunk@13638 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Adds a role setting for controlling visibility of users: all or members of ↵Jean-Philippe Lang2014-11-111-0/+6
| | | | | | visible projects (#11724). git-svn-id: http://svn.redmine.org/redmine/trunk@13584 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Restores commits reverted when rails-4.1 branch was merged (#18174).Jean-Philippe Lang2014-10-241-3/+3
| | | | | | Patch by Mischa The Evil. git-svn-id: http://svn.redmine.org/redmine/trunk@13504 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Adds a single controller for users and groups memberships and support for ↵Jean-Philippe Lang2014-10-231-5/+0
| | | | | | adding multiple projects at once (#11702). git-svn-id: http://svn.redmine.org/redmine/trunk@13498 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Merged rails-4.1 branch (#14534).Jean-Philippe Lang2014-10-221-9/+26
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@13482 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Adds buit-in groups to give specific permissions to anonymous and non ↵Jean-Philippe Lang2014-09-281-13/+21
| | | | | | members users per project (#17976). git-svn-id: http://svn.redmine.org/redmine/trunk@13417 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Expire other sessions on password change (#17796).Jean-Baptiste Barth2014-09-161-0/+1
| | | | | | | Contributed by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@13412 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Code cleanup (#17717).Jean-Philippe Lang2014-09-141-3/+5
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@13403 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Invalidate security tokens on password or email changes (#17717).Jean-Baptiste Barth2014-09-141-1/+13
| | | | | | | Contributed by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@13396 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Make 2nd parameter optional in User#allowed_to_globally? for consistency ↵Jean-Baptiste Barth2014-09-061-1/+5
| | | | | | (#6498). git-svn-id: http://svn.redmine.org/redmine/trunk@13364 e93f8b46-1217-0410-a6f0-8f06a7374b81
* remove trailing white-spaces from app/models/user.rbToshi MARUYAMA2014-07-111-3/+3
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@13287 e93f8b46-1217-0410-a6f0-8f06a7374b81
* introduce request_store to ensure that the current user doesn't leak across ↵Toshi MARUYAMA2014-05-011-2/+2
| | | | | | | | request boundaries (#16685) Contributed by Holger Just. git-svn-id: http://svn.redmine.org/redmine/trunk@13110 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Strip invalid UTF-8 bytes in User#find_by_login (#16107).Jean-Philippe Lang2014-02-221-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@12916 e93f8b46-1217-0410-a6f0-8f06a7374b81
* update copyright year (#15977)Toshi MARUYAMA2014-01-291-1/+1
| | | | | | Contributed by Daniel Felix. git-svn-id: http://svn.redmine.org/redmine/trunk@12736 e93f8b46-1217-0410-a6f0-8f06a7374b81
* remove unneeded Relation#all from Principal modelToshi MARUYAMA2014-01-271-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@12731 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Adds settings for disabling browser language detection and language ↵Jean-Philippe Lang2014-01-241-0/+12
| | | | | | preference (#2691). git-svn-id: http://svn.redmine.org/redmine/trunk@12691 e93f8b46-1217-0410-a6f0-8f06a7374b81