Commit Graph

345 Commits

Author SHA1 Message Date
Rémy Coutable ea72d53ec0 Streamline the "Report button"
This simplifies the "Report button" to not use open a dropdown and
adds a tooltip on this button.
This also removes an extra spec and adds missing specs.
2015-09-29 21:47:01 +02:00
Rémy Coutable 5f95a5e070 Disable the "Report abuse" button if a user has already been reported 2015-09-29 21:11:51 +02:00
Stan Hu 0383afc66a Add user preference to view project activity and starred project activity as default dashboard
Closes #2662
2015-09-26 08:46:05 -07:00
Kamil Trzcinski 5285e01d54 Fix: features/ci/runners_spec.rb 2015-09-15 21:21:46 +02:00
Stan Hu d7812a95cf Re-annotate models 2015-09-06 07:48:48 -07:00
Douwe Maan fe86c8dfbd Merge branch 'master' into joelkoglin/gitlab-ce-feature_fix_ldap_auth_issue_993 2015-08-29 11:49:14 -07:00
Valery Sizov ff30b40754 Make all profile public 2015-08-27 13:06:14 +03:00
Joel Koglin 4d2f36118a Issue #993: Fixed login failure when extern_uid changes 2015-08-21 09:36:27 -07:00
Stan Hu 98eb89be5d Only show recent push event if the branch still exists or a recent merge request has not been created
Closes #2277
2015-08-20 01:38:15 -07:00
Zeger-Jan van de Weg 4ccd767abf Only publish ssh key-type and key 2015-08-04 14:33:18 +02:00
Atsushi Ishida f33898ecfb Re-annotate models 2015-08-03 01:52:54 +09:00
Robert Speicher 5ce6d18681 Add User.find_by_username! 2015-07-23 17:16:39 -04:00
Dmitriy Zaporozhets 5f34759ecb
Allow user to specify content he wants to see on project page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-07-13 18:24:15 +02:00
Robert Speicher 22724418d3 Add User#disable_two_factor!
This method encapsulates all the logic for disabling 2FA on a specific
User model.
2015-07-10 16:18:30 -04:00
Douwe Maan 43b444f40a Merge branch 'rs-issue-1850' into 'master'
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
2015-06-24 09:47:13 +00:00
Robert Speicher 7e4829c3e9 Allow user to remove public email address 2015-06-23 21:22:00 -04:00
Robert Speicher e9b65a3e05 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`
2015-06-23 18:07:15 -04:00
Dmitriy Zaporozhets f189c36d8d Merge branch 'rs-dev-issue-2414' into 'master'
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
2015-06-23 08:48:22 +00:00
Robert Speicher dcfce8b198 Use alias_attribute to define User#two_factor_enabled 2015-06-22 21:14:07 -04:00
Dmitriy Zaporozhets 29b6d465a7 Merge branch 'rs-dev-issue-2355' into 'master'
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
2015-06-22 09:48:49 +00:00
Robert Speicher d3ff8c1a95 Make default value for otp_required_for_login false instead of null 2015-06-20 19:40:48 -04:00
Robert Speicher 516b4c1248 Allow Admin to filter users by 2FA status 2015-06-19 16:35:53 -04:00
Robert Speicher 6c8f0fe906 Add convenience methods to User for getting and setting 2FA status 2015-06-19 14:59:42 -04:00
Robert Speicher 7964e7d6a1 Move the User dashboard enum further up in the class 2015-06-19 14:59:07 -04:00
Robert Speicher 7e31a369f5 Spec and refactor User.find_for_commit
Now it executes a single query instead of a possible three at the cost
of some scary-looking ARel calls.
2015-06-17 16:37:11 -04:00
swellard 19e5b043fe Fix duplicate 'Email has already been taken' message when creating a user, updated comments 2015-06-16 14:24:05 +01:00
swellard 98615ef536 Fix duplicate 'Email has already been taken' message when creating a user 2015-06-16 14:24:05 +01:00
Robert Speicher 2bc4fd2d04 Add `dashboard` attribute to User model 2015-06-13 17:59:11 -04:00
zenati b0de6e9ae2 An `in_namespace` scope is already present 2015-06-09 13:42:01 +02:00
Dmitriy Zaporozhets b9219469f7 Merge branch 'make-namespaces-api-available-to-all-users' into 'master'
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
2015-06-04 15:59:17 +00:00
Dmitriy Zaporozhets d047d299bf Merge pull request #9318 from jvanbaarsen/allow-special-chars-bio
Allow special characters in users bio
2015-05-29 10:41:01 +02:00
Stan Hu 67992b9be6 Make namespace API available to all users
Closes https://github.com/gitlabhq/gitlabhq/issues/9328
2015-05-28 11:39:12 -07:00
Dmitriy Zaporozhets 499154518a
You can not remove user if he/she is an only owner of group
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>
2015-05-28 12:00:02 +02:00
Jeroen van Baarsen 3865a1d925 Allow special characters in users bio
**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>
2015-05-28 10:45:22 +02:00
Robert Speicher b88da58cb6 Add `reference_pattern` to Referable models 2015-05-26 15:48:32 -04:00
Robert Speicher c0faf91ff2 Add `to_reference` for models that support references
Now there is a single source of information for which attribute a model
uses to be referenced, and its special character.
2015-05-26 15:48:30 -04:00
Hannes Rosenögger 1dd0caf4d9 Merge branch 'fix-avatar-removal' into 'master'
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
2015-05-12 14:46:58 +00:00
Dmitriy Zaporozhets 4a373be861 Merge branch '2fa' into 'master'
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
2015-05-12 09:41:27 +00:00
Robert Speicher 19b897e998 Remove extra `devise` call that got added by accident 2015-05-10 19:13:47 -04:00
Robert Speicher 11989d62d0 Remove unnecessary User#login accessor override 2015-05-09 17:39:16 -04:00
Robert Speicher c845347b23 Generate 10 2FA backup codes instead of the default of 5 2015-05-09 17:32:48 -04:00
Robert Speicher b050bb5bad Fix 2FA backup code removal 2015-05-09 17:32:48 -04:00
Robert Speicher 661d09a22b Re-annotate User model 2015-05-09 17:32:24 -04:00
Robert Speicher 66bc758e2b Update User model for two-factor auth 2015-05-09 17:32:05 -04:00
Dmitriy Zaporozhets 50a2a229e7 Fix rubocop complain 2015-05-09 17:31:10 -04:00
Dmitriy Zaporozhets 7302395142 Init 2 factor authentication for user model 2015-05-09 17:31:07 -04:00
Maran a0fd2eb568 Don't show duplicate deploy keys. Fixes #1516 2015-05-08 21:32:03 +02:00
Stan Hu bf4b438459 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
2015-05-07 10:00:35 -07:00
Stan Hu a3157626f1 Re-annotate models 2015-05-03 13:38:27 -07:00
Dmitriy Zaporozhets 4291e28af7 Merge branch 'change-primary-email' into 'master'
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
2015-05-03 11:00:51 +00:00