summaryrefslogtreecommitdiff
path: root/spec/models/user_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Refactor Gitlab::IdentifierYorick Peterse2016-10-051-0/+17
| | | | | | This refactors Gitlab::Identifier so it uses fewer queries and is actually tested. Queries are reduced by caching the output as well as using 1 query (instead of 2) to find a user using an SSH key.
* Project tools visibility levelFelipe Artur2016-09-011-2/+1
|
* Show "Create Merge Request" widget for push events to fork projects on the ↵Paco Guzman2016-08-241-0/+10
| | | | source project
* Move to project dropdown with infinite scroll for better performance17932-move-to-project-dropdown-improvePaco Guzman2016-08-171-0/+47
| | | | | | | | Use just SQL to check is a user can admin_issue on a project Tradeoff - we duplicate how we check admin_issue in a SQL relation in the Ability class
* Simplify the name for data builder, feedback:Lin Jen-Shin2016-08-121-1/+1
| | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5620#note_13671791
* Merge remote-tracking branch 'upstream/master' into pipeline-hooks-without-slackLin Jen-Shin2016-08-111-14/+14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/master: (233 commits) Fix awardable button mutuality loading spinners Update CHANGELOG for 8.10.5 Clean up project destruction Small refactor of doc/development/README.md Avoid commit lookup on diff_helper Removed extra newline from redis_spec.rb Used cached value of project count to reduce DB load Remove duplicate link_to statements Mention add_column_with_default in downtime guide Add missing space to generic badge template Rename `run` task helper method to prevent conflict with StateMachine Add a method in Project to return a cached value of total count of projects spellcheck Add svg guidelines to ui guide Add Changelog entry for Grape upgrade [ci skip] Fix Grape tests. Retain old behavior Update Grape from 0.13.0 to 0.15.0. adds second batch of tests changed to active tense fixes part1 of files to start using active tense ...
| * adds second batch of tests changed to active tenseactive-tense-test-coveragetiagonbotelho2016-08-091-13/+13
| |
| * Tidy the key spec and fix failing user specKeith Pope2016-08-021-1/+1
| |
* | Move those builders to their own namespace, feedback:Lin Jen-Shin2016-08-041-1/+3
|/ | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5620#note_13540099
* Merge branch 'email-domain-blacklist' into 'master' Robert Speicher2016-07-201-6/+53
|\ | | | | | | | | | | | | | | | | | | | | Added the ability to block sign ups using a domain blacklist. As part of this MR, I restructured the Application Settings form to separate **Sign up** related settings from **Sign in** related settings and make everything cleaner and easier to read. Fixes #19749 Related to #5573 See merge request !5259
| * Default to manual input for `domain_whitelist`, syntax fixes and added new ↵Patricio Cano2016-07-181-2/+2
| | | | | | | | tests.
| * Refactor and rename `restricted_signup_domains` to `domain_whitelist` to ↵Patricio Cano2016-07-181-5/+5
| | | | | | | | better conform to its behavior and newly introduced behavior.
| * Refactored the domain separator regex, plus syntax and grammar fixes.Patricio Cano2016-07-181-3/+3
| |
| * Added the ability to block sign ups using a domain blacklist.Patricio Cano2016-07-181-3/+50
| |
* | Ensure Owners are included in the scope for authorized_projectsRobert Speicher2016-07-191-7/+16
|/ | | | | | | | Prior, when providing a `min_access_level` parameter to this method, we called `Gitlab::Access.values` instead of `all_values`, mistakenly omitting the `OWNER` level. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/19878
* Track a user who created a pipelineKamil Trzcinski2016-07-151-0/+2
|
* Avoid `describe`-ing symbols in specsrs-describe-symbolsRobert Speicher2016-07-121-6/+6
|
* Added setting to set new users by default as externalDravere2016-07-071-0/+21
| | | | | | As requested by the issue #14508 this adds an option in the application settings to set newly registered users by default as external. The default setting is set to false to stay backward compatible.
* Fix an information disclosure when requesting access to a group containing ↵Rémy Coutable2016-06-241-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | private projects The issue was with the `User#groups` and `User#projects` associations which goes through the `User#group_members` and `User#project_members`. Initially I chose to use a secure approach by storing the requester's user ID in `Member#created_by_id` instead of `Member#user_id` because I was aware that there was a security risk since I didn't know the codebase well enough. Then during the review, we decided to change that and directly store the requester's user ID into `Member#user_id` (for the sake of simplifying the code I believe), meaning that every `group_members` / `project_members` association would include the requesters by default... My bad for not checking that all the `group_members` / `project_members` associations and the ones that go through them (e.g. `Group#users` and `Project#users`) were made safe with the `where(requested_at: nil)` / `where(members: { requested_at: nil })` scopes. Now they are all secure. Signed-off-by: Rémy Coutable <remy@rymai.me>
* Add a blank line between before and it:Lin Jen-Shin2016-06-071-0/+3
| | | | | Feedback from: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4404#note_12301563
* Avoid using subject and is_expected.to:Lin Jen-Shin2016-06-071-5/+8
| | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4404#note_12274602
* Prefer do and end for before/after:Lin Jen-Shin2016-06-071-7/+21
| | | | | Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4404#note_12217415
* Fix method definition styleLin Jen-Shin2016-06-071-2/+2
|
* Use rspec's matchers and update style:Lin Jen-Shin2016-06-071-8/+10
| | | | | Feedback from: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4404#note_12194552
* Use subject for more consistent testing style:Lin Jen-Shin2016-06-071-4/+5
| | | | | Feedback from: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4404#note_12194489
* This is easier to write:Lin Jen-Shin2016-06-071-1/+1
| | | | | Feedback from: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4404#note_12194471
* Add a test for User#ci_authorized_runnersLin Jen-Shin2016-06-071-0/+57
|
* Add a `U2fRegistrations` table/model.Timothy Andrew2016-06-061-0/+60
| | | | | | | | | | | | | | - To hold registrations from U2F devices, and to authenticate them. - Previously, `User#two_factor_enabled` was aliased to the `otp_required_for_login` column on `users`. - This commit changes things a bit: - `User#two_factor_enabled` is not a method anymore - `User#two_factor_enabled?` checks both the `otp_required_for_login` column, as well as `U2fRegistration`s - Change all instances of `User#two_factor_enabled` to `User#two_factor_enabled?` - Add the `u2f` gem, and implement registration/authentication at the model level.
* Merge branch 'master' into awardablesawardablesZ.J. van de Weg2016-06-031-4/+4
|\
| * Update tests for the current_application_settings request store changesDJ Mountney2016-05-271-4/+4
| |
* | Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into awardablesFatih Acet2016-05-181-0/+1
|\ \ | |/ | | | | | | | | | | | | # Conflicts: # app/controllers/projects/merge_requests_controller.rb # app/models/note.rb # db/schema.rb # spec/models/note_spec.rb
| * Change skip_user_confirmation_email to send_user_confirmation_emailFelipe Artur2016-05-161-0/+1
| |
* | Merge branch 'master' into awardablesZeger-Jan van de Weg2016-05-111-0/+19
|\ \ | |/
| * Tidy up user project specsSean McGivern2016-05-111-13/+8
| |
| * Restrict starred projects to viewable onesSean McGivern2016-05-101-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `User#starred_projects` doesn't perform any visibility checks. This has a couple of problems: 1. It assumes a user can always view all of their starred projects in perpetuity (project not changed to private, access revoked, etc.). 2. It assumes that we'll only ever allow a user to star a project they can view. This is currently the case, but bugs happen. Add `User#viewable_starred_projects` to filter the starred projects by those the user either has explicit access to, or are public or internal. Then use that in all places where we list the user's starred projects.
* | Merge branch 'master' into awardablesZeger-Jan van de Weg2016-05-111-63/+0
|\ \ | |/
| * Remove the annotate gem and delete old annotationsJeroen van Baarsen2016-05-091-63/+0
| | | | | | | | | | | | | | | | | | In 8278b763d96ef10c6494409b18b7eb541463af29 the default behaviour of annotation has changes, which was causing a lot of noise in diffs. We decided in #17382 that it is better to get rid of the whole annotate gem, and instead let people look at schema.rb for the columns in a table. Fixes: #17382
* | Add tests on Awardables and Award EmojiZeger-Jan van de Weg2016-05-101-0/+1
|/
* Allow temp-oauth-email as notification emailerror-when-ldap-doesn-t-supply-an-email-address-14559Zeger-Jan van de Weg2016-03-311-0/+7
|
* Merge branch 'master' into 4009-external-users4009-external-usersZeger-Jan van de Weg2016-03-151-26/+0
|\
| * Revert "Merge branch 'avatar-cropping' into 'master' "revert-avatar-croppingRémy Coutable2016-03-151-26/+0
| | | | | | | | | | This reverts commit 01160fc06182de89c400af174861f6545ad6ceb8, reversing changes made to 4bff9daf8b6d85e9c78565e21cfaa3f6d36f0282.
* | Create an external users tab on Admin user listZeger-Jan van de Weg2016-03-131-1/+0
| | | | | | | | Also incorporates the review into this, mainly spec changes.
* | External UsersZeger-Jan van de Weg2016-03-131-0/+16
|/ | | | | The user has the rights of a public user execpt it can never create a project, group, or team. Also it cant view internal projects.
* Fixed a few spec typosYorick Peterse2016-03-111-3/+3
|
* Use ILIKE/LIKE for searching usersYorick Peterse2016-03-111-11/+37
|
* Merge branch 'rs-avatar-validation' into 'master' Douwe Maan2016-03-011-1/+15
|\ | | | | | | | | | | | | Only validate avatar cropping values when avatar is present AND changed Closes #13905 See merge request !3018
| * Only validate avatar cropping values when avatar is present AND changedrs-avatar-validationRobert Speicher2016-02-291-1/+15
| | | | | | | | Closes #13905
* | Reset `otp_grace_period_started_at` after disabling 2FARobert Speicher2016-02-291-0/+2
|/ | | | | | Prior, if the user enabled 2FA, then disabled it and came back some time after the grace period expired, they would be forced to enable 2FA immediately.
* Add `:with_avatar` trait to User factoryRobert Speicher2016-02-241-0/+12
|
* Rename Tasks to TodosDouglas Barbosa Alexandre2016-02-201-1/+1
|