summaryrefslogtreecommitdiff
path: root/app/controllers
Commit message (Collapse)AuthorAgeFilesLines
* Load related MRs/branches asynchronouslyYorick Peterse2016-04-131-10/+30
| | | | | | | | | | | | Currently this works by loading the HAML partials via XHR. While this is not the nicest setup it _is_ the easiest setup using the tools we currently have. Loading this data asynchronously doesn't make loading the related MRs/branches itself faster, it merely ensures that loading the issue itself is not slowed down. Fixes gitlab-org/gitlab-ce#14949
* Merge branch 'rs-archive-cache-worker-cron' into 'master' Dmitriy Zaporozhets2016-04-131-1/+0
|\ | | | | | | | | | | | | Move RepositoryArchiveCacheWorker to sidekiq-cron Closes #15105 See merge request !3663
| * Move RepositoryArchiveCacheWorker to sidekiq-cronrs-archive-cache-worker-cronRobert Speicher2016-04-121-1/+0
| | | | | | | | Closes #15105
* | Merge branch 'decouple-member-notification' into 'master' Douwe Maan2016-04-124-33/+48
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Decouple membership and notifications This allow you to have notification setting per project even if you are member of group. It also creates background for having notification settings in project you are not member of. - [x] Make it work - [x] Migrations - [x] CHANGELOG - [x] More tests - [x] API For #3359 After this merge request there is still some work to be done: * create migration that remove duplicates in notification settings table and create uniq index (8.8 probably) * remove notification_level field from Member model in 9.0 * make proper API for notification settings * use `MemberCreateService` instead of Member#after_create callback for creating notification settings (after #14709) * maybe more tests Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> See merge request !3421
| * | Simplify Projects::NotificationSettingsControllerDouglas Barbosa Alexandre2016-04-121-7/+0
| | |
| * | Requires user to be signed in when changing notification settingsDouglas Barbosa Alexandre2016-04-112-0/+4
| | |
| * | Reuse `User#notification_settings_for` when it's possibleDouglas Barbosa Alexandre2016-04-112-5/+4
| | |
| * | Merge branch 'master' into decouple-member-notificationDouglas Barbosa Alexandre2016-04-112-3/+13
| |\ \ | | |/
| * | Add method to return the user notification setting for a group, or a projectDouglas Barbosa Alexandre2016-04-081-1/+1
| | |
| * | Use default_value_for to set default NotificationSetting#levelDouglas Barbosa Alexandre2016-04-081-1/+0
| | |
| * | Simplify query to retrieve NotificationSetting on controllersDouglas Barbosa Alexandre2016-04-082-2/+2
| | |
| * | Merge branch 'master' into decouple-member-notificationDouglas Barbosa Alexandre2016-04-0813-42/+96
| |\ \
| * | | Change how notification settings in profile are rendered and updatedDmitriy Zaporozhets2016-03-302-22/+20
| | | | | | | | | | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
| * | | Create NotificationSettings object only when user change value in dropdownDmitriy Zaporozhets2016-03-302-1/+24
| | | | | | | | | | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
| * | | Fix few bugs related to recent notifications refactoringDmitriy Zaporozhets2016-03-301-1/+0
| | | | | | | | | | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
| * | | Refactor creating notification setting with defaultsDmitriy Zaporozhets2016-03-301-6/+1
| | | | | | | | | | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
| * | | Introduce NotificationSetting to user interfaceDmitriy Zaporozhets2016-03-302-13/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * visiting project will create notification setting if missing * change notification setting per project even without membership * use notification settings instead of membership on profile page Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | | | Merge branch 'build-notification-fixes' into 'master' Jacob Schatz2016-04-121-0/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Build notification null check Cancels build notification interval on page change See merge request !3540
| * | | | Rubocop fixPhil Hughes2016-04-111-1/+1
| | | | |
| * | | | Preparing build statusPhil Hughes2016-04-111-0/+2
| | |_|/ | |/| |
* | | | Merge branch 'fix-missing-saml-error-handling' into 'master' Robert Speicher2016-04-121-10/+16
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add proper nil and error handling to SAML login process While writing the feature that would allow certain Omniauth providers to be marked as external I noticed that there is a scenario where the `gl_user` method can return `nil` and if this is not properly checked, it will lead to exceptions that will cause 500 errors. It is quite easy to land in this scenario, so I added `nil` checks. I also noticed that the `saml` method in the `omniauth_callbacks_controller.rb` file lacked a `rescue` for `Gitlab::OAuth::SignupDisabledError`, which can happen if the default configuration from `1_settings.rb` is applied. So I also added this check. See merge request !3609
| * | | | Add missing proper nil and error handling to SAML login process.Patricio Cano2016-04-071-10/+16
| | |_|/ | |/| |
* | | | Fix code review issuesRobert Schilling2016-04-121-1/+1
| | | |
* | | | Delete notes via APIRobert Schilling2016-04-121-3/+2
| |/ / |/| |
* | | Merge branch 'mr-ui-update' into 'master' Jacob Schatz2016-04-111-3/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updated UI for new merge request Closes #2540 ![Screen_Shot_2016-03-29_at_12.53.18](/uploads/426e603675171f0dc4e0af83c7762eba/Screen_Shot_2016-03-29_at_12.53.18.png) ![Screen_Shot_2016-03-29_at_12.53.13](/uploads/645ad7955acfb9f7693245fcc048ee49/Screen_Shot_2016-03-29_at_12.53.13.png) See merge request !3228
| * | | Fixed target project updatePhil Hughes2016-04-061-3/+1
| | | |
| * | | Updated UI for new merge requestPhil Hughes2016-04-061-0/+2
| | | | | | | | | | | | | | | | Closes #2540
* | | | Add a `program` tag to Sentry Raven contextrs-sidekiq-sentry-contextRobert Speicher2016-04-091-0/+10
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | This will let us filter errors by the program environment in which they were encountered. Source: http://stackoverflow.com/a/28370539/223897 Closes #15092
* | | Merge branch 'issue_14012' into 'master' Rémy Coutable2016-04-071-5/+26
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Fix problem when creating milestones in groups without projects Fixes #14012 See merge request !3481
| * | | Implement review suggestionsFelipe Artur2016-04-071-5/+3
| | | |
| * | | Improve codeFelipe Artur2016-04-051-16/+13
| | | |
| * | | Improve codeFelipe Artur2016-04-051-7/+15
| | | |
| * | | Fix problem when creating milestones in groups without projectsFelipe Artur2016-04-051-5/+23
| | | |
* | | | Merge branch 'fix/2fa-authentication-spoofing' into 'master' Rémy Coutable2016-04-071-6/+9
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix 2FA authentication spoofing ## Summary This is security fix for vulnerability described at https://gitlab.com/gitlab-org/gitlab-ce/issues/14900. Attacker was able to bypass password authentication of users that have 2FA enabled, and consequently sign is as a different user, without knowing his password, if he managed to guess 2FA One Time Password for that user. It was also possible to enumerate users and check if they have 2FA enabled, because GitLab responded with different error for each case. ## Fix This MR attempts to change default user search scope if `otp_user_id` session variable has been set. If it is present, it means that user has 2FA enabled, and has already been verified with login and password. In this case we should look for user with `otp_user_id` first, before picking it up by `login`. Both, 2FA authentication spoofing and 2FA discovery have been covered by specs. ## Further work Current 2FA code is a bit tricky, so it probably needs some refactoring. See merge request !1947
| * | | | Fix 2FA authentication spoofing vulnerabilityGrzegorz Bizon2016-04-071-6/+9
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | This commit attempts to change default user search scope if otp_user_id session variable has been set. If it is present, it means that user has 2FA enabled, and has already been verified with login and password. In this case we should look for user with otp_user_id first, before picking it up by login.
* | | | Merge branch 'feature/expose-builds-badge' into 'master' Rémy Coutable2016-04-072-1/+10
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Expose badges This MR exposes badge somewhere in visible place. ![expose_badges](/uploads/d2e290d3013d1ef2b1bdeebbbe2c5d8b/expose_badges.png) Closes #13801 See merge request !3326
| * | | | Use default branch when displaying list of badgesGrzegorz Bizon2016-04-061-1/+1
| | | | |
| * | | | Change name of badge variable in badges controllerGrzegorz Bizon2016-04-061-1/+1
| | | | |
| * | | | Expose project badges in project settings menuGrzegorz Bizon2016-04-061-0/+2
| | | | |
| * | | | Make it possible to switch ref in badges viewGrzegorz Bizon2016-04-061-0/+2
| | | | |
| * | | | Extend build status badge, add html/markdown methodsGrzegorz Bizon2016-04-061-0/+2
| | | | |
| * | | | Add project badges view prototypeGrzegorz Bizon2016-04-061-1/+4
| |/ / /
* | | | Merge branch 'fix_14638' into 'master' Rémy Coutable2016-04-071-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #14638. The SQL query was ambiguous and in this case we want to filter projects. See merge request !3462
| * | | | Fixes #14638.PotHix2016-04-061-1/+1
| |/ / / | | | | | | | | | | | | The SQL query was ambiguous and in this case we want to filter projects.
* | | | Return status code 303 after a branch DELETE operation to avoid project deletionStan Hu2016-04-062-2/+4
| | | | | | | | | | | | | | | | Closes #14994
* | | | Merge branch 'saml-external-groups' into 'master' Robert Speicher2016-04-071-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow SAML to identify external users and set them as such Related to #4009 Fixes #14577 This allows SAML to retrieve group information form the `SAML Response` and match that to a setting that will flag all matching users as external. See merge request !3530
| * | | | Avoid saving again if the user attributes haven't changedPatricio Cano2016-04-041-1/+1
| | |/ / | |/| |
* | | | Merge branch 'patch/fix-markdown-preview-wikis' into 'master' Robert Speicher2016-04-071-0/+14
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wiki preview URL converting problem [via Markdown] Current implementation when rendering the preview, thinks relative links are for project repository files. We are creating a new preview route that will define correct context data to render for wikis instead. Fixes #2380, #1184 See merge request !3461
| * | | Add specific markdown_preview route for WikisGabriel Mazetto2016-03-301-0/+14
| | | |
* | | | Merge branch 'fix-project-path-rename' into 'master' Stan Hu2016-04-051-0/+3
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix Error 500 after renaming a project path Renaming the path of a project would result in an Error 500 due to `@repository` being memoized with the old path. An Error 500 would result: ``` Started GET "/testing2/test1" for 127.0.0.1 at 2016-04-04 12:42:30 +0000 Processing by ProjectsController#show as HTML Parameters: {"namespace_id"=>"testing2", "id"=>"test1"} Completed 200 OK in 637ms (Views: 194.2ms | ActiveRecord: 111.8ms) Started GET "/testing2/test1/edit" for 127.0.0.1 at 2016-04-04 12:42:33 +0000 Processing by ProjectsController#edit as HTML Parameters: {"namespace_id"=>"testing2", "id"=>"test1"} Completed 200 OK in 594ms (Views: 183.8ms | ActiveRecord: 87.4ms) Started PATCH "/testing2/test1" for 127.0.0.1 at 2016-04-04 12:42:41 +0000 Processing by ProjectsController#update as HTML Parameters: {"utf8"=>"✓", "authenticity_token"=>"[FILTERED]", "project"=>{"nam e"=>"test123", "path"=>"test123"}, "namespace_id"=>"testing2", "id"=>"test1"} Completed 500 Internal Server Error in 1852ms (ActiveRecord: 124.0ms) ActionView::Template::Error (no repository for such path): 2: %legend 3: Builds: 4: 5: - unless @repository.gitlab_ci_yml 6: .form-group 7: .col-sm-offset-2.col-sm-10 8: %p Builds need to be configured before you can begin using Contin uous Integration. app/models/repository.rb:59:in `block in empty?' lib/repository_cache.rb:19:in `fetch' app/models/repository.rb:59:in `empty?' app/models/repository.rb:471:in `gitlab_ci_yml' app/views/projects/_builds_settings.html.haml:5:in `_app_views_projects__build s_settings_html_haml__782034335636359229_73397600' app/views/projects/edit.html.haml:87:in `block in _app_views_projects_edit_htm l_haml___2388082585934859365_47390860' app/views/projects/edit.html.haml:8:in `_app_views_projects_edit_html_haml___2 388082585934859365_47390860' app/controllers/projects_controller.rb:54:in `block (2 levels) in update' app/controllers/projects_controller.rb:43:in `update' lib/gitlab/middleware/go.rb:16:in `call' ``` Closes #14885 See merge request !3528