summaryrefslogtreecommitdiff
path: root/app/models/user.rb
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Merge branch 'extend_markdown_upload' into 'master'Dmitriy Zaporozhets2015-02-251-1/+1
|\ | | | | | | | | | | | | | | | | | | Generalizes image upload in drag and drop in markdown to all files From https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/265 by Hannes Rosenögger. - [x] Rebase on master when !1553 is merged in See merge request !1530
| * Merge branch 'master' into extend_markdown_uploadDouwe Maan2015-02-251-3/+4
| |\ | | | | | | | | | | | | # Conflicts: # app/controllers/files_controller.rb
| * \ Merge branch 'master' into extend_markdown_uploadDouwe Maan2015-02-241-0/+5
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # app/views/projects/issues/_form.html.haml # app/views/projects/merge_requests/_form.html.haml # app/views/projects/merge_requests/_new_submit.html.haml # app/views/projects/milestones/_form.html.haml # app/views/projects/notes/_form.html.haml # app/views/projects/wikis/_form.html.haml # config/routes.rb # spec/controllers/projects_controller_spec.rb
| * \ \ Merge branch 'extend_markdown_upload' into generic-uploadsDouwe Maan2015-02-201-1/+1
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # app/controllers/files_controller.rb # app/controllers/projects/uploads_controller.rb # app/uploaders/attachment_uploader.rb
| * | | | Split up AttachmentUploader.Douwe Maan2015-02-201-1/+1
| | | | |
* | | | | Merge branch 'bitbucket-import'Dmitriy Zaporozhets2015-02-251-0/+1
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | Conflicts: app/views/import/gitorious/status.html.haml db/schema.rb
| * | | | Add Bitbucket importer.Douwe Maan2015-02-241-0/+1
| | |_|/ | |/| |
* | | | Merge branch 'contributed-projects' into 'master'Dmitriy Zaporozhets2015-02-241-3/+4
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | Improve contributed project and commit calendar selection. Fixes #2024. See merge request !1554
| * | | Contributed projects either have user pushes or created MRs.Douwe Maan2015-02-241-3/+4
| |/ /
* | | LDAP users don't need to set a password to Git over HTTP.Douwe Maan2015-02-231-0/+5
|/ /
* | Merge branch 'projects-limit-default' into 'master'Dmitriy Zaporozhets2015-02-191-2/+9
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Correctly set default projects limit for new users. See #2014. Note that the projects limit still isn't retroactively applied to existing users (probably as intended) See merge request !1547
| * | Correctly set default projects limit for new users.Douwe Maan2015-02-191-2/+9
| | |
* | | Revert "Fix broken access control and refactor avatar upload"Dmitriy Zaporozhets2015-02-191-1/+1
|/ / | | | | | | This reverts commit 7d5f86f6cbd187e75a6ba164ad6bfd036977dd07.
* | Get contributed projects for last year onlyDmitriy Zaporozhets2015-02-181-0/+1
| |
* | Get contributed projects only if push event existsDmitriy Zaporozhets2015-02-181-0/+1
| |