summaryrefslogtreecommitdiff
path: root/spec/models/user_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add highest_role method to UserThiago Presa2019-03-221-0/+62
|
* Make Admin::UsersController work with Ruby 2.6Stan Hu2019-02-191-7/+7
| | | | | | | | | | | Ruby 2.6 introduced `Enumerable#filter`, which takes no arguments. Attempting to call `filter` on an `ActiveRecord::Relation` with a scope will fail with a `wrong number of arguments (given 1, expected 0)` message because the `Enumerable#filter` implementation overrides the delegated `ActiveRecord::Relation#filter` method. To make Admin::UsersController compatible with Ruby 2.6, rename `User.filter` to `User.filter_items`.
* Improve the GitHub and Gitea import feature table interfaceLuke Bennett2019-02-131-0/+15
| | | | | | | | | | | These are backend changes. Use Vue for the import feature UI for "githubish" providers (GitHub and Gitea). Add "Go to project" button after a successful import. Use CI-style status icons and improve spacing of the table and its component. Adds ETag polling to the github and gitea import jobs endpoint.
* Group Guests are no longer able to see merge requestsTiago Botelho2019-01-311-0/+27
| | | | | | | Group guests will only be displayed merge requests to projects they have a access level to, higher than Reporter. Visible projects will still display the merge requests to Guests
* Rename GroupHierarchy into ObjectHierarchyJarka Košanová2018-12-191-2/+2
| | | | | | - we now use the hierarchy class also for epics - also rename supports_nested_groups? into supports_nested_objects? - move it to a concern
* Add name, author and sha to releasesAlessio Caiazza2018-12-131-0/+1
| | | | | | This commit adds a name to each release, defaulting it to tag name, keeps track of the SHA when a new release is created and tracks the current user as release author.
* Use FastDestroy for deleting uploadsJan Provaznik2018-12-061-1/+1
| | | | | | | | | | It gathers list of file paths to delete before destroying the parent object. Then after the parent_object is destroyed these paths are scheduled for deletion asynchronously. Carrierwave needed associated model for deleting upload file. To avoid this requirement, simple Fog/File layer is used directly for file deletion, this allows us to use just a simple list of paths.
* Resolve "Can add an existing group member into a group project with new ↵James Lopez2018-12-061-5/+5
| | | | permissions but permissions are not overridden"
* fix wordingShinya Maeda2018-12-031-1/+1
|
* Another fixShinya Maeda2018-12-031-2/+2
|
* Validate enum uniquenessShinya Maeda2018-12-031-0/+2
|
* User#find_by_any_email to respect confirmed flag on secondary emailsImre Farkas2018-11-261-5/+31
|
* Match users better by their private commit emailNick Thomas2018-11-191-2/+35
| | | | | | Private commit emails were introduced in !22560, but some parts of GitLab were not updated to take account of them. This commit adds support in places that were missed.
* User can keep their commit email private43521-keep-personal-emails-privateTiago Botelho2018-11-071-1/+78
| | | | | | | | The private commit email is automatically generated in the format: id-username@noreply.HOSTNAME GitLab instance admins are able to change the HOSTNAME portion, that defaults to Gitlab's hostname, to whatever they prefer.
* [master] Persist only SHA digest of PersonalAccessToken#tokenImre Farkas2018-10-291-0/+8
|
* Resolve "Filter discussion (tab) by comments or activity in issues and merge ↵Oswaldo Ferreira2018-10-231-0/+9
| | | | requests"
* Filter out archived projects from issue/mr countBrett Walker2018-09-171-0/+28
| | | | Pass the 'non_archived' flag to finder methods
* Resolve "Add functionality to change what email address online actions ↵Nick Thomas2018-09-141-1/+49
| | | | commit using"
* Ask user explicitly about usage stats agreementJan Provaznik2018-09-071-0/+42
|
* Port changes for CODEOWNERS to CEBob Van Landuyt2018-09-061-0/+17
| | | | | | This ports the changes for the CODEOWNERS feature to CE: - It adds the CODEOWNERS file. - It adds the mention of the `with-codeowners` branch in TestEnv
* Fix SQL error when sorting 2FA-enabled users by name in admin areaDmitriy Zaporozhets2018-08-211-0/+8
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Refactor AutocompleteControllerdefine-abstraction-levelsYorick Peterse2018-08-201-10/+130
| | | | | | | | | | | | | | | | | | | | | | | This refactors the AutocompleteController according to the guidelines and boundaries discussed in https://gitlab.com/gitlab-org/gitlab-ce/issues/49653. Specifically, ActiveRecord logic is moved to different finders, which are then used in the controller. View logic in turn is moved to presenters, instead of directly using ActiveRecord's "to_json" method. The finder MoveToProjectFinder is also adjusted according to the abstraction guidelines and boundaries, resulting in a much more simple finder. By using finders (and other abstractions) more actively, we can push a lot of logic out of the controller. We also remove the need for various "before_action" hooks, though this could be achieved without using finders as well. The various finders related to AutcompleteController have also been moved into a namespace. This removes the need for calling everything "AutocompleteSmurfFinder", instead you can use "Autocomplete::SmurfFinder".
* Merge branch 'bvl-user-status-message-35463' into 'master'Rémy Coutable2018-08-011-0/+1
|\ | | | | | | | | | | | | Allow users to set a status Closes #35463 See merge request gitlab-org/gitlab-ce!20614
| * Allow users to set a statusBob Van Landuyt2018-07-301-0/+1
| | | | | | | | | | This can be done trough the API for the current user, or on the profile page.
* | Add support for searching users by confirmed e-mailsStan Hu2018-07-281-0/+15
|/ | | | | This is in preparation for modifying importers to assign e-mails for only confirmed emails.
* Resolve "Rename the `Master` role to `Maintainer`" BackendMark Chao2018-07-111-33/+33
|
* Merge branch 'update-rubocop'Sean McGivern2018-07-091-19/+19
|\
| * Updates from `rubocop -a`Lin Jen-Shin2018-07-091-19/+19
| |
* | Rails5 fix mysql milliseconds problem in specsJasper Maes2018-07-071-1/+3
|/
* send ico files with inline dispositionAlexis Reigel2018-06-051-1/+1
|
* Merge branch '46010-add-more-validations-for-runners-and-runner-type' into ↵Kamil Trzciński2018-06-011-22/+18
|\ | | | | | | | | | | | | 'master' Improve validations for Ci::Runner#runner_type See merge request gitlab-org/gitlab-ce!18901
| * Fix spec for User#ci_owned_runnersDylan Griffith2018-05-311-20/+17
| |
| * Refactor validations and make runner factory by default to be instance-wide ↵Kamil Trzciński2018-05-311-2/+1
| | | | | | | | runner
* | Export assigned issues in iCalendar feedImre Farkas2018-05-311-6/+6
|/
* Don't set the notification_email when only unconfirmed_email is changed22846-notifications-broken-during-email-address-change-before-email-confirmedRémy Coutable2018-05-221-18/+70
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Resolve "Opening Project with invite but without accepting leads to 404 ↵🙈 jacopo beschi 🙉2018-05-171-0/+18
| | | | error page"
* Merge branch 'jprovazn-remote-upload-destroy' into 'master'Kamil Trzciński2018-05-161-1/+9
|\ | | | | | | | | | | | | Delete remote uploads Closes #45425 See merge request gitlab-org/gitlab-ce!18698
| * Delete remote uploadsJan Provaznik2018-05-161-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ObjectStore uploader requires presence of associated `uploads` record when deleting the upload file (through the carrierwave's after_commit hook) because we keep info whether file is LOCAL or REMOTE in `upload` object. For this reason we can not destroy uploads as "dependent: :destroy" hook because these would be deleted too soon. Instead we rely on carrierwave's hook to destroy `uploads` in after_commit hook. But in before_destroy hook we still have to delete not-mounted uploads (which don't use carrierwave's destroy hook). This has to be done in before_Destroy instead of after_commit because `FileUpload` requires existence of model's object on destroy action. This is not ideal state of things, in a next step we should investigate how to unify model dependencies so we can use same workflow for all uploads. Related to #45425
* | Rename User#ci_authorized_runners -> ci_owned_runnersDylan Griffith2018-05-161-7/+7
| |
* | Allow group runners to be viewed/edited in APIDylan Griffith2018-05-161-13/+53
|/
* Does not log failed sign-in attempts when database is in read-only modeDouglas Barbosa Alexandre2018-05-141-0/+14
|
* Block access to API & git when terms are enforcedBob Van Landuyt2018-05-101-0/+27
| | | | | | When terms are enforced, but the user has not accepted the terms access to the API & git is rejected with a message directing the user to the web app to accept the terms.
* Resolve "Namespace factory is problematic"Lin Jen-Shin2018-04-231-3/+5
|
* Allow group owner to enable runners from subgroups (#41981)Dylan Griffith2018-04-091-0/+15
|
* Cache personal projects count.Andreas Brandl2018-04-061-4/+16
| | | | Closes #37462.
* Ensure internal users (ghost, support bot) get assigned a namespacedm-internal-user-namespaceDouwe Maan2018-04-051-0/+2
|
* [Rails5] Rename `sort` methods to `sort_by_attribute`blackst0ne2018-04-041-6/+6
|
* Merge branch 'dm-deploy-keys-default-user' into 'master'Sean McGivern2018-03-291-1/+1
|\ | | | | | | | | | | | | Ensure hooks run when a deploy key without a user pushes Closes #44317 See merge request gitlab-org/gitlab-ce!18057
| * Don’t delete deploy key when user who created it is deletedDouwe Maan2018-03-281-1/+1
| |
* | Remove permanent redirectsBob Van Landuyt2018-03-281-35/+10
|/ | | | | Removes permanent redirects, this means that redirects will only be possible as long as the old route isn't taken by a new project/group.