summaryrefslogtreecommitdiff
path: root/app/models/user.rb
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'rs-issue-1850' into 'master'Douwe Maan2015-06-241-8/+4
|\ | | | | | | | | | | | | | | | | | | | | Only look up Commit authors/committers by email - Removes looking up authors/committers by name - Renames `User.find_for_commit` to `User.find_by_any_email` Closes #1850 See merge request !878
| * Only look up Commit authors/committers by emailrs-issue-1850Robert Speicher2015-06-231-8/+4
| | | | | | | | | | - Removes looking up authors/committers by name - Renames `User.find_for_commit` to `User.find_by_any_email`
* | Allow user to remove public email addressrs-dev-issue-2419Robert Speicher2015-06-231-1/+3
|/
* Merge branch 'rs-dev-issue-2414' into 'master'Dmitriy Zaporozhets2015-06-231-18/+16
|\ | | | | | | | | | | | | | | | | | | Allow Admin to filter users by 2FA status > ![Screen_Shot_2015-06-19_at_4.38.12_PM](https://gitlab.com/gitlab-org/gitlab-ce/uploads/deba7f2a6b8d1548c1d1ac401e0e35a1/Screen_Shot_2015-06-19_at_4.38.12_PM.png) Closes internal https://dev.gitlab.org/gitlab/gitlabhq/issues/2414 See merge request !852
| * Use alias_attribute to define User#two_factor_enabledrs-dev-issue-2414Robert Speicher2015-06-221-14/+3
| |
| * Make default value for otp_required_for_login false instead of nullRobert Speicher2015-06-201-4/+4
| |
| * Allow Admin to filter users by 2FA statusRobert Speicher2015-06-191-4/+13
| |
* | Merge branch 'rs-dev-issue-2355' into 'master'Dmitriy Zaporozhets2015-06-221-4/+20
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | MergeRequest#show performance improvements This is a first pass on improving the performance of the `MergeRequests#show` page. Notable changes: - The "Commits" tab is loaded lazily, so the initial page load should be much faster for MRs with many commits. - Relative timestamps via `timeago` are only initialized once per load instead of `O(n^2)`. This greatly improves frontend rendering times for a large number of commits. - Refactored `User.find_for_commit` to use a single ARel-generated SQL query instead of the old method which resulted in one query, and could result in up to three. See merge request !838
| * Spec and refactor User.find_for_commitRobert Speicher2015-06-171-4/+20
| | | | | | | | | | Now it executes a single query instead of a possible three at the cost of some scary-looking ARel calls.
* | Add convenience methods to User for getting and setting 2FA statusRobert Speicher2015-06-191-0/+12
| |
* | Move the User dashboard enum further up in the classRobert Speicher2015-06-191-4/+3
|/
* Fix duplicate 'Email has already been taken' message when creating a user, ↵swellard2015-06-161-1/+1
| | | | updated comments
* Fix duplicate 'Email has already been taken' message when creating a userswellard2015-06-161-1/+3
|
* Add `dashboard` attribute to User modelRobert Speicher2015-06-131-1/+6
|
* An `in_namespace` scope is already presentzenati2015-06-091-3/+5
|
* Merge branch 'make-namespaces-api-available-to-all-users' into 'master'Dmitriy Zaporozhets2015-06-041-0/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make namespace API available to all users ### What does this MR do? This MR makes it possible for a user to query namespaces to which he/she has access. Also, it adds documentation for the existing API. ### Why was this MR needed? Even though the `groups` API exists, it might still be useful to have an endpoint that tells the namespace type (e.g. `user` vs. `group`), especially if a user has access to a number of different projects. ### What are the relevant issue numbers? Closes https://github.com/gitlabhq/gitlabhq/issues/9328 See merge request !708
| * Make namespace API available to all usersStan Hu2015-05-281-0/+6
| | | | | | | | Closes https://github.com/gitlabhq/gitlabhq/issues/9328
* | Merge pull request #9318 from jvanbaarsen/allow-special-chars-bioDmitriy Zaporozhets2015-05-291-1/+1
|\ \ | | | | | | Allow special characters in users bio
| * | Allow special characters in users bioJeroen van Baarsen2015-05-281-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | **What does this do?** It removes the very strict sanitation on the users bio field, so that people can have a bio like "I <3 GitLab" **Why is this needed?** Currently when you enter a bio with "I <3 GitLab", we only store "I ". This is unexpected behaviour, since we want users to have a normal profile, without having to worry what characters are allowed and which are not. **Related issues:** Fixes https://github.com/gitlabhq/gitlabhq/issues/5625 Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
* | You can not remove user if he/she is an only owner of groupDmitriy Zaporozhets2015-05-281-0/+4
|/ | | | | | | To prevent loose of group data you need to transfer or remove group first before you can remove user Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Add `reference_pattern` to Referable modelsRobert Speicher2015-05-261-0/+8
|
* Add `to_reference` for models that support referencesRobert Speicher2015-05-261-3/+13
| | | | | Now there is a single source of information for which attribute a model uses to be referenced, and its special character.
* Merge branch 'fix-avatar-removal' into 'master'Hannes Rosenögger2015-05-121-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | Fix bug where avatar filenames were not actually deleted from the database during removal This would result in a 404 error in certain views. The `save` call was being rolled back due to an error in the validation step. Relax the validation step so that this works. Closes #1570 See merge request !620
| * Fix bug where avatar filenames were not actually deleted from the database ↵Stan Hu2015-05-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | during removal. This would result in a 404 error in certain views. The `save` call was being rolled back due to an error in the validation step. Relax the validation step so that this works. Closes #1570
* | Merge branch '2fa' into 'master'Dmitriy Zaporozhets2015-05-121-2/+13
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two-factor authentication Implement's Two-factor authentication using tokens. - [X] Authentication logic - [X] Enable/disable 2FA feature - [x] Make 2-step login process if 2FA enabled - [x] Backup codes - [x] Backup code removed after being used - [x] Check backup codes for mysql db (mention mysql limitation if applied) - [x] Add tests - [x] Test if https://github.com/tinfoil/devise-two-factor#disabling-automatic-login-after-password-resets applies, and address if so - [x] Wait for fixed version of `attr_encrypted` or fork and use forked version - https://github.com/attr-encrypted/attr_encrypted/issues/155 Fixes http://feedback.gitlab.com/forums/176466-general/suggestions/4516817-implement-two-factor-authentication-2fa See merge request !474
| * | Remove extra `devise` call that got added by accidentRobert Speicher2015-05-101-3/+0
| | |
| * | Remove unnecessary User#login accessor overrideRobert Speicher2015-05-091-5/+0
| | |
| * | Generate 10 2FA backup codes instead of the default of 5Robert Speicher2015-05-091-1/+1
| | |
| * | Fix 2FA backup code removalRobert Speicher2015-05-091-0/+3
| | |
| * | Re-annotate User modelRobert Speicher2015-05-091-0/+5
| | |
| * | Update User model for two-factor authRobert Speicher2015-05-091-2/+10
| | |
| * | Fix rubocop complainDmitriy Zaporozhets2015-05-091-1/+1
| | |
| * | Init 2 factor authentication for user modelDmitriy Zaporozhets2015-05-091-1/+4
| |/
* | Don't show duplicate deploy keys. Fixes #1516Maran2015-05-081-1/+1
|/
* Re-annotate modelsStan Hu2015-05-031-0/+1
|
* Merge branch 'change-primary-email' into 'master'Dmitriy Zaporozhets2015-05-031-2/+26
|\ | | | | | | | | | | | | | | | | | | Allow primary email to be set to an email that you've already added. Fixes gitlab-com/support-forum#106. When the user sets their primary email to an email that they've already added to their account, this patch makes sure that secondary email record is destroyed, and a new email record is created for the old primary email. This is based on the assumption that in this case no email was meant to be deleted, but the user simply wanted to change which of their emails is primary. See merge request !591
| * Allow primary email to be set to an email that you've already added.change-primary-emailDouwe Maan2015-04-301-2/+26
| |
* | Add application setting to restrict user signups to e-mail domainsStan Hu2015-05-021-0/+24
|/ | | | | | | | | | | This feature was requested long ago: http://feedback.gitlab.com/forums/176466-general/suggestions/4118466-ability-to-register-only-from-ceratain-domains This MR is based off !253 but changed to use application settings and use wildcard strings to give more flexibility in pattern matching. Regexps seemed overkill and easy to get wrong. Only restrict e-mail addresses upon creation
* Allow user to choose which email to be publicSenorsen2015-04-141-0/+9
| | | | | This commit allows user to show one of their emails in profile page, or don't show email in this page.
* Merge branch 'public-deploy-keys' into 'master'Dmitriy Zaporozhets2015-04-131-1/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow admin to create public deploy keys that are accessible to any project. Addresses private issue https://dev.gitlab.org/gitlab/gitlabhq/issues/1774. Project settings: ![Screen_Shot_2015-03-27_at_14.46.48](https://gitlab.com/gitlab-org/gitlab-ce/uploads/01799ff912671ba6db3f828ea1aca1a6/Screen_Shot_2015-03-27_at_14.46.48.png) The "Public deploy keys" section is only shown when there are any. If there are public deploy keys but no project deploy keys, only public deploy keys are shown. If there are no public deploy keys and no project deploy keys, the current "Deploy keys from projects you have access to will be displayed here" placeholder is shown. The list of projects below the public key has been changed to only show projects the user has access to. "Public deploy key" seems to be repeated on the left, but the first is just the title. The label is always visible for public deploy keys. Admin index: ![Screen_Shot_2015-03-27_at_14.47.06](https://gitlab.com/gitlab-org/gitlab-ce/uploads/ea889d274cfd3f0694d47d602f4f3e94/Screen_Shot_2015-03-27_at_14.47.06.png) Admin detail page: ![Screen_Shot_2015-03-27_at_14.47.16](https://gitlab.com/gitlab-org/gitlab-ce/uploads/8c8475e05bf6b497da3b9f1bc102329f/Screen_Shot_2015-03-27_at_14.47.16.png) Projects using the deploy key are listed on the left and can be disabled easily. See merge request !469
| * Allow admin to create public deploy keys that are accessible to any project.Douwe Maan2015-04-031-1/+9
| |
* | Fix persistent XSS vulnerability around profile website URLs.Douwe Maan2015-04-101-2/+2
|/
* Use more specific regexes.Douwe Maan2015-03-271-2/+2
|
* Move User.cleanup_username to Namespace.cleanup_path.Douwe Maan2015-03-271-16/+0
|
* Clean up subscriptions when user is deleted.user-subscriptions-dependentDouwe Maan2015-03-241-0/+1
|
* Refactor contributions events and write tests for calendarDmitriy Zaporozhets2015-03-221-5/+2
|
* Use `project_member` instead of `team_member`.Douwe Maan2015-03-151-4/+1
|
* Blocking user does not remove him/her from project/groups but show blocked labelDmitriy Zaporozhets2015-03-091-19/+1
|
* Re-annotate modelsDmitriy Zaporozhets2015-03-041-45/+47
|
* Fix and test User#contributed_projects_ids.Douwe Maan2015-02-271-0/+1
|