summaryrefslogtreecommitdiffstats
path: root/app/models/principal.rb
Commit message (Collapse)AuthorAgeFilesLines
* Merged r22746 from trunk to 5.1-stable (#40043).Marius Balteanu2024-02-271-1/+1
| | | | git-svn-id: https://svn.redmine.org/redmine/branches/5.1-stable@22755 e93f8b46-1217-0410-a6f0-8f06a7374b81
* <=> operator should return nil when invoked with an incomparable object ↵Go MAEDA2023-06-291-3/+5
| | | | | | | | | (#38772). Patch by Go MAEDA. git-svn-id: https://svn.redmine.org/redmine/trunk@22269 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fix RuboCop offense Performance/StringInclude (#37247).Go MAEDA2023-02-061-1/+1
| | | | git-svn-id: https://svn.redmine.org/redmine/trunk@22097 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Update copyright year to 2023 (#38141).Go MAEDA2023-01-011-1/+1
| | | | git-svn-id: https://svn.redmine.org/redmine/trunk@22013 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Update copyright year in source files to 2022 (#36379).Go MAEDA2022-01-021-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@21342 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Switch to zeitwerk autoloader (#29914, #32938).Marius Balteanu2021-11-171-3/+0
| | | | | | Patch by Takashi Kato. git-svn-id: http://svn.redmine.org/redmine/trunk@21287 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Explicitly specify escape character using an ESCAPE on SQLite (#35073).Marius Balteanu2021-10-091-4/+4
| | | | | | Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@21240 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Use sanitize_sql_like in like scopes (#35073).Marius Balteanu2021-10-031-2/+2
| | | | | | Patch Jens Krämer. git-svn-id: http://svn.redmine.org/redmine/trunk@21231 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Update copyright year in source files to 2021 (#33069).Go MAEDA2021-03-251-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@20846 e93f8b46-1217-0410-a6f0-8f06a7374b81
* remove spaces inside {} of app/models/principal.rbToshi MARUYAMA2020-11-181-4/+4
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@20423 e93f8b46-1217-0410-a6f0-8f06a7374b81
* use "do end" instead of {} at ActiveRecord scope lambda of ↵Toshi MARUYAMA2020-11-101-9/+8
| | | | | | app/models/principal.rb git-svn-id: http://svn.redmine.org/redmine/trunk@20328 e93f8b46-1217-0410-a6f0-8f06a7374b81
* use "do end" instead of {} at app/models/principal.rbToshi MARUYAMA2020-11-071-2/+2
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@20288 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Replace Hash#merge! with Hash#[]= (#34160).Go MAEDA2020-10-241-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@20175 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Use scope assignable_watchers (#4511).Go MAEDA2020-04-251-0/+3
| | | | | | | Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@19726 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Update copyright year in source files to 2020 (#33069).Go MAEDA2020-03-031-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@19553 e93f8b46-1217-0410-a6f0-8f06a7374b81
* cleanup: rubocop: fix Layout/BlockAlignment in app/models/principal.rbToshi MARUYAMA2019-11-091-5/+6
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@19003 e93f8b46-1217-0410-a6f0-8f06a7374b81
* cleanup: rubocop: fix Layout/AlignArguments in app/models/principal.rbToshi MARUYAMA2019-11-061-1/+2
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@18927 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Update copyright year.Go MAEDA2019-05-251-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@18198 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Use Regexp#match? to reduce allocations of MatchData object (#28940).Go MAEDA2019-03-271-1/+1
| | | | | | | Patch by Pavel Rosický. git-svn-id: http://svn.redmine.org/redmine/trunk@18011 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Support frozen_string_literal in app/**/*.rb (#26561).Go MAEDA2019-03-171-2/+2
| | | | | | | Contributed by Pavel Rosický. git-svn-id: http://svn.redmine.org/redmine/trunk@17987 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Add "frozen_string_literal: false" for all files (#26561).Go MAEDA2019-03-151-0/+2
| | | | | | | This will be changed to true in the future. git-svn-id: http://svn.redmine.org/redmine/trunk@17947 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Use find_by instead of where.first to remove unnecessary sorting (#26747).Go MAEDA2018-10-061-1/+1
| | | | | | | Patch by Yuichi HARADA. git-svn-id: http://svn.redmine.org/redmine/trunk@17586 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Include locked members in filters (#15201).Go MAEDA2018-06-091-1/+3
| | | | | | | Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@17371 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Support for lastnames with spaces in user autocompleters (#28154).Go MAEDA2018-04-071-6/+11
| | | | | | | Patch by Gregor Schmidt. git-svn-id: http://svn.redmine.org/redmine/trunk@17259 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Update copyright.Jean-Philippe Lang2017-06-251-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@16685 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Option to set a default assignee on each project (#482).Jean-Philippe Lang2017-04-081-0/+5
| | | | | | Patch by Felix Schäfer. git-svn-id: http://svn.redmine.org/redmine/trunk@16525 e93f8b46-1217-0410-a6f0-8f06a7374b81
* SQL Cleanup.Jean-Philippe Lang2017-04-041-2/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@16479 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Don't preload projects and roles on Principal#memberships association (#23519).Jean-Philippe Lang2017-01-071-2/+1
| | | | | | Patch by Ondřej Ezr. git-svn-id: http://svn.redmine.org/redmine/trunk@16153 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Speeds up rendering of the project list for users who belong to hundreds of ↵Jean-Philippe Lang2017-01-031-2/+12
| | | | | | projects. git-svn-id: http://svn.redmine.org/redmine/trunk@16123 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Validate status of users and groups.Jean-Philippe Lang2016-04-111-0/+12
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@15320 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
* Fixed that Project.uniq.visible errors under certain conditions (#21182).Jean-Philippe Lang2015-11-091-2/+1
| | | | | | Patch by Redmine CRM. git-svn-id: http://svn.redmine.org/redmine/trunk@14857 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Find user by login then by email.Jean-Philippe Lang2015-08-151-4/+3
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@14506 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Moved implementation to Principal.Jean-Philippe Lang2015-08-151-0/+24
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@14500 e93f8b46-1217-0410-a6f0-8f06a7374b81
* use String#casecmp for case insensitive comparison (#20369)Toshi MARUYAMA2015-08-121-1/+1
| | | | | | Contributed by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@14484 e93f8b46-1217-0410-a6f0-8f06a7374b81
* remove trailing white spaces from app/models/principal.rbToshi MARUYAMA2015-06-171-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@14322 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Add support for multiple email addresses per user (#4244).Jean-Philippe Lang2015-01-171-2/+10
| | | | 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
* Adds a role setting for controlling visibility of users: all or members of ↵Jean-Philippe Lang2014-11-111-0/+28
| | | | | | visible projects (#11724). git-svn-id: http://svn.redmine.org/redmine/trunk@13584 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Adds a single controller for users and groups memberships and support for ↵Jean-Philippe Lang2014-10-231-0/+5
| | | | | | 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-7/+9
| | | | 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-0/+3
| | | | | | members users per project (#17976). git-svn-id: http://svn.redmine.org/redmine/trunk@13417 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Improve performance of Principal.member_of scopeJean-Baptiste Barth2014-05-191-1/+1
| | | | | | | | | The 'join' turns to be slow for large numbers of members (>20k). Using a sub-query like in Principal.not_member_of is more efficient and performance is the same for smaller values. git-svn-id: http://svn.redmine.org/redmine/trunk@13139 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
* code format cleanup Principal classToshi MARUYAMA2013-12-261-1/+5
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@12464 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Optimizes the SQL query behind Principal#member_of.Jean-Philippe Lang2013-02-171-1/+1
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11426 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Adds "sorted" scope to Principal and User and sort users/groups properly.Jean-Philippe Lang2013-01-231-0/+10
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11259 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Copyright for 2013 (#12788).Jean-Philippe Lang2013-01-121-1/+1
| | | | | | Patch by Daniel Felix. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11169 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Code cleanup.Jean-Philippe Lang2012-12-131-2/+2
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10994 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Moved user status constants to Principal model.Jean-Philippe Lang2012-12-081-0/+6
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10958 e93f8b46-1217-0410-a6f0-8f06a7374b81