Commit Graph

126 Commits

Author SHA1 Message Date
Stan Hu 0c1ccda43f Add "Confirm user" button in user admin page
Closes #2116
Closes https://github.com/gitlabhq/gitlabhq/issues/9502
2015-08-05 00:35:53 -07: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
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
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
Robert Speicher 5a9ede4721 Update mock and stub syntax for specs 2015-06-22 12:13:46 +02: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 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
Robert Speicher 2bc4fd2d04 Add `dashboard` attribute to User model 2015-06-13 17:59:11 -04:00
Robert Speicher 844d72716e Add Gitlab::Themes module; remove Gitlab::Theme
Now we can simply loop through all themes, among other things.

This also removes the `dark_theme` / `light_theme` classes and the
`theme_type` helper, since they weren't used anywhere.
2015-06-13 17:58:16 -04:00
Robert Speicher 47251b85e0 ensure_length_of -> validate_length_of 2015-06-10 01:31:26 -04: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
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
Robert Speicher 8773f339a3 Minor model spec cleanups
Snippet model was missing project association
2015-05-26 15:48:30 -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
Robert Speicher 661d09a22b Re-annotate User model 2015-05-09 17:32:24 -04:00
Stan Hu a3157626f1 Re-annotate models 2015-05-03 13:38:27 -07:00
Stan Hu eb4f1eb5f5 Add application setting to restrict user signups to e-mail domains
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
2015-05-02 09:36:52 -07:00
Douwe Maan 3f7531d6f2 Move User.cleanup_username to Namespace.cleanup_path. 2015-03-27 11:09:29 +01:00
Dmitriy Zaporozhets 66c61f023b Re-annotate models 2015-03-04 14:14:00 -08:00
Douwe Maan 804a2488cf Fix and test User#contributed_projects_ids. 2015-02-27 10:49:47 +01:00
Douwe Maan 161d15541a Prevent autogenerated OAuth username to clash with existing namespace. 2015-02-13 12:39:11 +01:00
Dmitriy Zaporozhets 529188e478 Merge branch 'master' of github.com:gitlabhq/gitlabhq 2015-02-12 16:47:52 -08:00
Douwe Maan 6685661b54 Clean username acquired from OAuth/LDAP.
Fixes #1967.
2015-02-12 21:05:27 +01:00
Jeroen van Baarsen 0c4a70a306 Updated rspec to rspec 3.x syntax
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-02-12 19:17:35 +01:00
Dmitriy Zaporozhets c5be267e40 Refactor issuable sorting a bit 2015-02-05 20:21:21 -08:00
Dmitriy Zaporozhets 98ee4a1fa7 Annotate models 2015-01-22 09:40:03 -08:00
Valery Sizov 3a5ed5260b Supporting for multiple omniauth provider for the same user 2014-12-04 13:03:55 +02:00
Andrey Krivko bafd30f92c Session API: Use case-insensitive authentication like in UI 2014-10-30 18:29:18 +02:00
Jan-Willem van der Meer 5e1c39cb78 Merge tests to support Multiple LDAP groups 2014-10-13 17:33:44 +02:00
Valery Sizov 4e0da2325b Admin: user sorting 2014-10-13 16:07:57 +03:00
Dmitriy Zaporozhets 8210d81381
Replace old references of users_project & users_group
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-14 19:51:54 +03:00
Dmitriy Zaporozhets c69b8e0459
Huge replace of old users_project and users_group references
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-14 19:32:51 +03:00
Dmitriy Zaporozhets ffc284301e Merge branch 'ldap/cache_check' into 'master'
Cache LDAP check everywhere

See merge request !1008
2014-08-13 13:11:04 +00:00
Jacob Vosmaer e0fea696c6 Skip LDAP cache check when LDAP is disabled 2014-08-06 18:03:01 +02:00
Jacob Vosmaer 1118a6fd34 Add a spec for User#requires_ldap_check? 2014-08-06 18:03:01 +02:00
Ciro Santilli 9b5c7a4d60 Add star count, view logic, more tests. 2014-07-17 22:47:16 +02:00
Ciro Santilli 714f7201d3 Add project stars. 2014-07-17 22:47:16 +02:00
Dmitriy Zaporozhets 13f017f01b
Fix user model specs
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-30 14:22:09 +03:00
Dmitriy Zaporozhets 0f550aa386
Remove mass assgnment specs
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-26 23:57:55 +03:00
Dmitriy Zaporozhets 2d87556847 Remove rails observers from application 2014-06-17 22:51:43 +03:00
Marin Jankovski f43e41973f Test for the apostrophe in the email 2014-06-11 13:36:30 +02:00
Dmitriy Zaporozhets 36f861f1b1
Re-annotate models
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-04-09 15:05:03 +03:00
Marin Jankovski 466203eb0c Additional check in the test. 2014-03-26 12:56:25 +01:00