summaryrefslogtreecommitdiff
path: root/app/models/user.rb
Commit message (Collapse)AuthorAgeFilesLines
* Make pipeline emails respect group email setting63485-fix-pipeline-emails-to-use-group-settingHeinrich Lee Yu2019-07-231-0/+5
| | | | | When a user's notification email is set for a group, we should use that for pipeline emails
* Migrate null values for users.private_profileAdam Hegyi2019-07-151-0/+7
| | | | | - Background migration for changing null values to false - Set false as default value for private_profile DB column
* Set the name of a user-namespace to the user nameBob Van Landuyt2019-07-091-2/+3
| | | | | | | | | | | | | Instead of setting the name of the namespace to the user's username, set it to the user's name. This is more consistent with how we name the routes: The route-name of a namespace is the human name of the routable. In the case of a user-namespace, this is the owner's name. When we change a user's name (both on create and update), we now also update the namespace-name to the user's name. This will make sure that if we also correctly update all the nested routes.
* Use an uncached application setting for usage ping checksStan Hu2019-07-021-2/+9
| | | | | | | | | | | | | | | | The introduction of the in-memory cache for application settings had a side effect of making it harder to invalidate changes when the settings occur. We now bypass the cache because it's possible the admin enabled the usage ping, and we don't want to annoy the user again if they already set the value. To avoid causing significant load on the system, we add an extra check to ensure the user is an admin. and we don't want to annoy the user again if they already set the value. This is a bit of hack, but the alternative would be to put in a more complex cache invalidation step. Since this call only gets called in the uncommon situation where the user is an admin and the only user in the instance, this shouldn't cause too much load on the system.
* #57815 Password authentication disabled for UltraAuth usersKartikey Tanna2019-06-181-2/+10
| | | | | Disabled password authentication for the users registered using omniauth-ultraauth strategy
* Bump devise to 4.6Utkarsh Gupta2019-05-211-9/+0
| | | | Signed-off-by: Utkarsh Gupta <guptautkarsh2102@gmail.com>
* Added user time settings fields to profileEzekiel Kigbo2019-05-071-0/+3
| | | | | | Udpated user_edit_profile_spec with time preferences Minor update form fields
* Add improvements to the global search processFrancisco Javier López2019-05-071-2/+6
| | | | | | | Removed the conditions added to Project.with_feature_available_for_user, and moved to the IssuableFinder. Now, we ensure that, in the projects retrieved in the Finder, the user has enough access for the feature.
* Upgrade Rails to 5.1.6.1Jasper Maes2019-04-231-1/+1
| | | | Model.new.attributes now also returns encrypted attributes.
* Externalize strings in app/modelsMartin Wortschack2019-04-121-6/+6
| | | | - Update PO file
* Remove User#internal_attributes methodPeter Leitzen2019-04-121-7/+3
| | | | | It's not needed anymore as we've replaced boolean `support_bot` with enum `bot_type`.
* Add part of needed codeGosia Ksionek2019-04-051-5/+35
| | | | | | | | | | | | | | | | | Add columns to store project creation settings Add project creation level column in groups and default project creation column in application settings Remove obsolete line from schema Update migration with project_creation_level column existence check Rename migrations to avoid conflicts Update migration methods Update migration method
* Add limit of 128 characters to users name57493-add-limit-to-user-nameBrandon Labuschagne2019-04-051-1/+1
| | | | | Truncate existing users names which exceed 128 characters Include test for truncating users names
* Merge branch 'ce-8317-operations-dashboard-usage-ping' into 'master'Douglas Barbosa Alexandre2019-04-021-0/+1
|\ | | | | | | | | Add dashboard scope for operations dashboard usage ping See merge request gitlab-org/gitlab-ce!26727
| * Add with_dashboard scope to Userce-8317-operations-dashboard-usage-pingLogan King2019-03-221-0/+1
| |
* | Inherit from ApplicationRecord instead of ActiveRecord::BaseNick Thomas2019-03-281-1/+1
|/
* Add highest_role method to UserThiago Presa2019-03-221-0/+4
|
* Merge branch 'fix/email_validator' into 'master'Stan Hu2019-03-091-3/+3
|\ | | | | | | | | | | | | Align EmailValidator to validate_email gem implementation. Closes #57352 See merge request gitlab-org/gitlab-ce!24971
| * Align EmailValidator to validate_email gem implementation.Horatiu Eugen Vlad2019-03-051-3/+3
| | | | | | | | | | | | Renamed EmailValidator to DeviseEmailValidator to avoid 'email:' naming collision with ActiveModel::Validations::EmailValidator in 'validates' statement. Make use of the options attribute of the parent class ActiveModel::EachValidator. Add more options: regex.
* | Adds the Rubocop ReturnNil copAndrew Newdigate2019-03-061-1/+1
| | | | | | | | | | This style change enforces `return if ...` instead of `return nil if ...` to save maintainers a few minor review points
* | Make Admin::UsersController work with Ruby 2.6Stan Hu2019-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | Ruby 2.6 introduced `Enumerable#filter`, which takes no arguments. Attempting to call `filter` on an `ActiveRecord::Relation` with a scope will fail with a `wrong number of arguments (given 1, expected 0)` message because the `Enumerable#filter` implementation overrides the delegated `ActiveRecord::Relation#filter` method. To make Admin::UsersController compatible with Ruby 2.6, rename `User.filter` to `User.filter_items`.
* | Merge branch 'import-go-to-project-cta-nibble-backend' into 'master'Lin Jen-Shin2019-02-151-0/+4
|\ \ | | | | | | | | | | | | BE Improve the GitHub and Gitea import feature table interface See merge request gitlab-org/gitlab-ce!24606
| * | Improve the GitHub and Gitea import feature table interfaceLuke Bennett2019-02-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are backend changes. Use Vue for the import feature UI for "githubish" providers (GitHub and Gitea). Add "Go to project" button after a successful import. Use CI-style status icons and improve spacing of the table and its component. Adds ETag polling to the github and gitea import jobs endpoint.
* | | Add a scope to preload emails on a userBob Van Landuyt2019-02-081-0/+1
|/ /
* | Add setting for first day of the weekFabian Schneider2019-02-061-0/+3
|/
* Add last activity to user administrationBrandon Labuschagne2019-02-051-0/+4
| | | | | | | | | The columns 'Created on' and 'Last activity' have been added to the admin -> users view. Sorting options have also been added for last activity and the search bar has been moved to match the issues page.
* Group Guests are no longer able to see merge requestsTiago Botelho2019-01-311-2/+6
| | | | | | | Group guests will only be displayed merge requests to projects they have a access level to, higher than Reporter. Visible projects will still display the merge requests to Guests
* Merge branch 'ce-1979-2-1' into 'master'Sean McGivern2019-01-281-1/+1
|\ | | | | | | | | Add query method for id See merge request gitlab-org/gitlab-ce!24386
| * Add query method for id queryMark Chao2019-01-151-1/+1
| |
* | Enable the Layout/ExtraSpacing cop56392-enable-the-layout-extraspacing-copRémy Coutable2019-01-241-1/+1
|/ | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Merge branch '44984-use-serializer-for-issuable-sidebar' into 'master'Mike Greiling2018-12-211-0/+4
|\ | | | | | | | | | | | | Resolve "Create a serializer to render issuables sidebar" Closes #44984 See merge request gitlab-org/gitlab-ce!23379
| * Refactor sidebar to use data from serializerHeinrich Lee Yu2018-12-191-0/+4
| |
* | Rename GroupHierarchy into ObjectHierarchyJarka Košanová2018-12-191-3/+3
|/ | | | | | - we now use the hierarchy class also for epics - also rename supports_nested_groups? into supports_nested_objects? - move it to a concern
* Add name, author and sha to releasesAlessio Caiazza2018-12-131-0/+1
| | | | | | This commit adds a name to each release, defaulting it to tag name, keeps track of the SHA when a new release is created and tracks the current user as release author.
* User#find_by_any_email to respect confirmed flag on secondary emailsImre Farkas2018-11-261-1/+1
|
* Match users better by their private commit emailNick Thomas2018-11-191-16/+33
| | | | | | Private commit emails were introduced in !22560, but some parts of GitLab were not updated to take account of them. This commit adds support in places that were missed.
* User can keep their commit email private43521-keep-personal-emails-privateTiago Botelho2018-11-071-2/+28
| | | | | | | | The private commit email is automatically generated in the format: id-username@noreply.HOSTNAME GitLab instance admins are able to change the HOSTNAME portion, that defaults to Gitlab's hostname, to whatever they prefer.
* Merge branch 'use_tokenauthenticatable_method_for_token_lookup' into 'master'Sean McGivern2018-11-051-6/+0
|\ | | | | | | | | Remove PersonalAccessTokensFinder#find_by method See merge request gitlab-org/gitlab-ce!22617
| * Remove PersonalAccessTokensFinder#find_by methoduse_tokenauthenticatable_method_for_token_lookupImre Farkas2018-11-051-6/+0
| | | | | | | | | | | | find_by_token is overriden by TokenAuthenticatable which can be easily missed or confused with #find_by(:token) defined by ActiveRecord. First step for safer usage is to remove #find_by.
* | Use a method for the has_many :keys in Projectuser-model-merge-conflictsYorick Peterse2018-11-011-1/+1
| | | | | | | | | | | | This moves the `where` in the `has_many :keys` association in Project to the Key model. This allows EE to override this method, instead of modifying the source code directly.
* | Move LDAP sync time constant to a methodYorick Peterse2018-11-011-1/+6
|/ | | | | | This moves the `1.hour` constant used as the LDAP sync time to a separate method. This allows EE to override this method using a module, instead of directly modifying the source code.
* Merge remote-tracking branch 'origin/master' into dev-masterDJ Mountney2018-10-291-1/+1
|\
| * Replace deprecated uniq on a Relation with distinctJasper Maes2018-10-261-1/+1
| |
* | Merge branch 'fix_pat_auth-11-4' into 'security-11-4'Robert Speicher2018-10-291-1/+1
| | | | | | | | | | [11.4] Fix Token lookup for Git over HTTP and registry authentication See merge request gitlab/gitlabhq!2577
* | [master] Persist only SHA digest of PersonalAccessToken#tokenImre Farkas2018-10-291-10/+1
|/
* Resolve "Filter discussion (tab) by comments or activity in issues and merge ↵Oswaldo Ferreira2018-10-231-0/+8
| | | | requests"
* Make getting a user by the username case insensitiveWilliam George2018-10-181-1/+1
|
* Backport CE changes for Ops Dashboard in EEPeter Leitzen2018-10-121-1/+1
|
* Clean up ActiveRecord code in TodoServiceYorick Peterse2018-10-081-0/+5
| | | | | | | | | | | | | | | | | | | | | | This refactors the TodoService class according to our code reuse guidelines. The resulting code is a wee bit more verbose, but it allows us to decouple the column names from the input, resulting in fewer changes being necessary when we change the schema. One particular noteworthy line in TodoService is the following: todos_ids = todos.update_state(state) Technically this is a violation of the guidelines, because `update_state` is a class method, which services are not supposed to use (safe for a few allowed ones). I decided to keep this, since there is no alternative. `update_state` doesn't produce a relation so it doesn't belong in a Finder, and we can't move it to another Service either. As such I opted to just use the method directly. Cases like this may happen more frequently, at which point we should update our documentation with some sort of recommendation. For now, I want to refrain from doing so until we have a few more examples.
* Applies the CE backport of EE#657Tiago Botelho2018-09-241-4/+6
|