summaryrefslogtreecommitdiff
path: root/app/controllers
Commit message (Collapse)AuthorAgeFilesLines
* Allow to edit access expiration date.Adam Niedzielski2016-08-051-1/+1
|
* Replace optional parameters with keyword arguments.Adam Niedzielski2016-08-021-1/+6
|
* WIPAdam Niedzielski2016-08-011-1/+1
|
* Clarify which project is deleted to avoid alarmclarify-deletion-messageStan Hu2016-07-291-1/+1
| | | | Closes #13654
* Merge branch 'rubocop/enable-access-modifiers-cops' into 'master' Robert Speicher2016-07-292-4/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable Rubocop cops that check access modifiers ## What does this MR do? This MR enables Rubocop cops that detect methods that should be restricted but are the part of public API because of access modifiers used improperly. This also fixes existing offenses. ## Why was this MR needed? Some method in our codebase are public instead of being private because it is sometimes difficult to get it right without static analysis. ## What are the relevant issue numbers? See #17478 Closes #17372 See merge request !5014
| * Fix some useless access modifiers in the codeGrzegorz Bizon2016-07-192-4/+0
| |
* | Use `Gitlab::Access` to protected branch access levels.Timothy Andrew2016-07-291-12/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. It makes sense to reuse these constants since we had them duplicated in the previous enum implementation. This also simplifies our `check_access` implementation, because we can use `project.team.max_member_access` directly. 2. Use `accepts_nested_attributes_for` to create push/merge access levels. This was a bit fiddly to set up, but this simplifies our code by quite a large amount. We can even get rid of `ProtectedBranches::BaseService`. 3. Move API handling back into the API (previously in `ProtectedBranches::BaseService#translate_api_params`. 4. The protected branch services now return a `ProtectedBranch` rather than `true/false`. 5. Run `load_protected_branches` on-demand in the `create` action, to prevent it being called unneccessarily. 6. "Masters" is pre-selected as the default option for "Allowed to Push" and "Allowed to Merge". 7. These changes were based on a review from @rymai in !5081.
* | Humanize protected branches' access levels at one location.Timothy Andrew2016-07-291-1/+3
| | | | | | | | | | | | | | 1. The model now contains this humanization data, which is the once source of truth. 2. Previously, this was being listed out in the dropdown component as well.
* | Add "No One Can Push" to the protected branches UI.Timothy Andrew2016-07-291-1/+1
| | | | | | | | | | | | | | | | | | | | 1. Move to dropdowns instead of checkboxes. One each for "Allowed to Push" and "Allowed to Merge" 2. Refactor the `ProtectedBranches` coffeescript class into `ProtectedBranchesAccessSelect`. 3. Modify the backend to accept the new parameters.
* | Use the `{Push,Merge}AccessLevel` models in the UI.Timothy Andrew2016-07-291-7/+17
| | | | | | | | | | | | | | | | | | | | | | 1. Improve error handling while creating protected branches. 2. Modify coffeescript code so that the "Developers can *" checkboxes send a '1' or '0' even when using AJAX. This lets us keep the backend code simpler. 3. Use services for both creating and updating protected branches. Destruction is taken care of with `dependent: :destroy`
* | Merge branch 'fix/use-fewer-queries-for-mr-notes' into 'master' Douwe Maan2016-07-281-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce number of queries made for merge_requests/:id/diffs ## What does this MR do? It reduces the number of DB queries made while processing and rendering MR notes. ## Are there points in the code the reviewer needs to double check? N/A ## Why was this MR needed? For `https://staging.gitlab.com/gitlab-org/gitlab-ce/merge_requests/3142/diffs.json`, for each note we make number of DB queries, almost all of them are handled by the AR caching layer, but they seem to add up a few seconds. Testing on staging, calling `merge_requests/3142/diffs.json` was reduced to ~5.5 seconds from ~8 seconds. ## What are the relevant issue numbers? N/A ## Screenshots (if relevant) N/A ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~ - [ ] ~~API support added~~ - ~~Tests~~ - [ ] ~~Added for this feature/bug~~ - [ ] ~~All builds are passing~~ - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5551
| * | Reduce number of queries made for merge_requests/:id/diffsfix/use-fewer-queries-for-mr-notesAhmad Sherif2016-07-281-1/+1
| | |
* | | Merge branch ↵Rémy Coutable2016-07-281-0/+1
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '20308-fix-title-that-is-show-in-the-dropdown-toggle-button-on-projects-branches' into 'master' Fix the title of the toggle dropdown button ## What does this MR do? Fix the dropdown-button toggle displaying the correctly title. ## Are there points in the code the reviewer needs to double check? See if the title is displaying correctly and if the code is acceptable. ## Why was this MR needed? When you choose `Last updated` it should display the title `Last updated` instead of `Recently updated`. This fix makes this correctly displays the title. ## What are the relevant issue numbers? Closes #20308. ## Screenshots (if relevant) ![filter-gitlab-ce](/uploads/52838679d134d57c6ff6120260806fda/filter-gitlab-ce.gif) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - Tests - [x] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5515
| * | Fix the title of the toggle dropdown buttonHerminio Torres2016-07-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before when you choose the way of `sort` instead it display the title correctly it was just apply the humanize helper in sort value. E.g. When you choose `Last updated` it should display the title `Last updated` instead of `Recently updated`. This fix makes this correctly displays the title. Change the implementation of the `link_to` `filter_branches_path` - Change the value of the `params[:sort]` in `link_to`. E.g. instead of using `'recently_updated'` is now using `sort_value_recently_updated`. - Change the values of the case in the `branches_sorted_by` method for the values it receives in the `params[:sort]` that are: `nil`, `'name'`, `'updated_desc'`, `'updated_asc'`.
* | | Replace reject_blocked with reject_blocked! in callbacks.rename-undefined-methodsConnor Shea2016-07-273-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Rails 4.2 and below, skipping callbacks (skip_before_action, skip_after_action, etc.) that use methods which do not exist will not throw any errors. On the other hand, Rails 5 does. See https://github.com/rails/rails/pull/19029 After testing with Rails 5 I noticed there are some methods that don't actually exist (because they were renamed, usually), this fixes a few instances of those. reject_blocked! was introduced in c9def945d4222eeb8026a0311495259bf99267a1, I can't find any references to reject_blocked ever existing.
* | | Merge branch 'akismet-ui-check' into 'master' Douwe Maan2016-07-271-2/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Submit new issues created via the WebUI or API to Akismet for spam check on public projects. ## What does this MR do? Submit new issues created via the WebUI by non project members to Akismet for spam check. ## Why was this MR needed? Support for Akismet was added only to the API with !2266. This MR builds on that functionality to also check issues submitted via the WebUI for spam. ## What are the relevant issue numbers? Related to: - #5573 - #5932 - gitlab-com/infrastructure#14 - gitlab-com/support#61 - !2266 cc @stanhu @MrChrisW See merge request !5333
| * | | Refactor spam validation to a concern that can be easily reused and improve ↵akismet-ui-checkPatricio Cano2016-07-261-2/+2
| | | | | | | | | | | | | | | | legibility in `SpamCheckService`
| * | | Refactor `SpamCheckService` to make it cleaner and clearer.Patricio Cano2016-07-261-7/+1
| | | |
| * | | Submit all issues on public projects to Akismet if enabled.Patricio Cano2016-07-261-13/+3
| | | |
| * | | Submit new issues created via the WebUI by non project members to Akismet ↵Patricio Cano2016-07-261-1/+17
| | | | | | | | | | | | | | | | for spam check.
* | | | Allow skipping users in autocompleteallow-skipping-users-in-autocompleteSean McGivern2016-07-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Pass an array of user IDs in the `skip_users` param to have them excluded from the results (unless they are explicitly included through the `current_user` or `author_id` params).
* | | | Incorporate review commentsStan Hu2016-07-262-2/+2
| | | |
* | | | Optimize maximum user access level lookup in loading of notesStan Hu2016-07-262-0/+6
| |/ / |/| | | | | | | | | | | | | | | | | | | | NotesHelper#note_editable? and ProjectTeam#human_max_access currently take about 16% of the load time of an issue page. This MR preloads the maximum access level of users for all notes in issues and merge requests with several queries instead of one per user and caches the result in RequestStore.
* | | Profile requests when a header is passedfeature/profile-requests-conditionallyAhmad Sherif2016-07-261-0/+17
| | |
* | | Show release notes in tag listSean McGivern2016-07-261-1/+2
|/ / | | | | | | | | | | | | | | A release's tag reference is just the name of the tag, not the entire tag object. This also fixes the tags index if a tag's message contains non-UTF8 byte sequences.
* | Merge branch 'master' into filter-branch-by-nametiagonbotelho2016-07-2216-88/+130
|\ \
| * \ Merge branch 'discussion-model' into 'master' Robert Speicher2016-07-214-36/+43
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Add Discussion model to represent MR/diff discussion Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/10325. See merge request !5376
| | * | Add Discussion model to represent MR/diff discussiondiscussion-modelDouwe Maan2016-07-204-36/+43
| | | |
| * | | Merge branch '4142-show-inline-video' into 'master' Rémy Coutable2016-07-212-5/+5
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for inline videos in issue, MR and notes (on issue, commit, MR, and MR diff) ## What does this MR do? It adds support for inline videos in issue, MR and notes (on issue, commit, MR, and MR diff). Most of the work was done by @hayesr in !3508 but a few improvements were still missing. ## Why was this MR needed? To be able to play uploaded videos in GitLab! ## What are the relevant issue numbers? Closes #4142. ## Screenshots ### Video players ![Screen_Shot_2016-07-19_at_18.44.09](/uploads/e85e531b455a41c3e66b26b356abaafd/Screen_Shot_2016-07-19_at_18.44.09.png) ----- ![Screen_Shot_2016-07-19_at_18.44.29](/uploads/05f52a812760210d1eae86a7f8fc48bc/Screen_Shot_2016-07-19_at_18.44.29.png) ----- ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - Tests - [x] Test `VideoLinkFilter` - [x] Test in `spec/features/markdown_spec.rb` - [x] Improve `spec/uploaders/file_uploader_spec.rb` - [x] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5215
| | * | | Remove VideoJS and clean the integrationRémy Coutable2016-07-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle videos in: - MD preview in notes: commit, issue/MR, MR diff - New notes in: commit, issue/MR, MR diff - Persisted notes in: commit, issue/MR, MR diff Signed-off-by: Rémy Coutable <remy@rymai.me>
| | * | | First support of videos in issues, MRs and notesEric Hayes2016-07-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | * Registered video MIME types * Currently supporting browser-supported formats with extensions that match the mime type
| * | | | Merge branch 'email-domain-blacklist' into 'master' Robert Speicher2016-07-201-1/+5
| |\ \ \ \ | | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * | | Reorder allowed params for `ApplicationSetting` and add more details to docs.email-domain-blacklistPatricio Cano2016-07-191-3/+3
| | | | |
| | * | | Refactor and rename `restricted_signup_domains` to `domain_whitelist` to ↵Patricio Cano2016-07-181-1/+1
| | | | | | | | | | | | | | | | | | | | better conform to its behavior and newly introduced behavior.
| | * | | Added the ability to block sign ups using a domain blacklist.Patricio Cano2016-07-181-0/+4
| | | |/ | | |/|
| * | | Merge branch 'cs-warn-on-failure' into 'master' Fatih Acet2016-07-201-0/+2
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Warn on failure ## What does this MR do? Adds styling and HTML for a `success_with_warnings` status in the MR widget. Unfinished as it needs some plumbing in the relevant CI controllers and models. ## Are there points in the code the reviewer needs to double check? Not at the moment, though I think I'll probably need help getting this to work in the backend. ## What are the relevant issue numbers? #17669 ## Screenshots (if relevant) ![Screen_Shot_2016-06-29_at_12.02.49_PM](/uploads/af4a915689633fe028f44bb34ae7a5b1/Screen_Shot_2016-06-29_at_12.02.49_PM.png) ## Does this MR meet the acceptance criteria? - [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [ ] API support added - Tests - [ ] Added for this feature/bug - [ ] All builds are passing - [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [ ] Branch has no merge conflicts with `master` (if you do - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) cc: @ayufan See merge request !5004
| | * | | Address feedback.Connor Shea2016-07-191-1/+1
| | | | |
| | * | | Add with_warnings? method to Pipelines and add tests.Connor Shea2016-07-191-0/+2
| | | |/ | | |/|
| * | | Merge branch 'issue_8110' into 'master' Rémy Coutable2016-07-203-37/+40
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow slack service to send messages on different channels closes #8110 ## Allow slack service to send messages on different channels ![new_slack_service](/uploads/87de0bd6b02a4f7853358676b5e74dff/new_slack_service.png) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [x] API support added - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5124
| | * | | Refactor service settings viewissue_8110Felipe Artur2016-07-203-20/+7
| | | | |
| | * | | Add project service documentation and update integration documentationFelipe Artur2016-07-193-30/+38
| | | | |
| | * | | Allow slack service to send messages on different channelsFelipe Artur2016-07-192-3/+11
| | |/ /
| * | | Merge branch 'compare-code-view' into 'master' Jacob Schatz2016-07-201-0/+1
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apply diff view cookie on compare ## What does this MR do? Correctly respects the code view changing when comparing 2 refs. ## What are the relevant issue numbers? Closes #19573 ## Screenshots (if relevant) ![Screen_Shot_2016-07-07_at_12.38.07](/uploads/b6da78cc2bbc2c79dbe8292037176c1a/Screen_Shot_2016-07-07_at_12.38.07.png) ![Screen_Shot_2016-07-07_at_12.38.17](/uploads/977f8b697c65bdb1701db11a39287ac6/Screen_Shot_2016-07-07_at_12.38.17.png) See merge request !5135
| | * | | Apply diff view cookie on comparecompare-code-viewPhil Hughes2016-07-151-0/+1
| | | | | | | | | | | | | | | | | | | | Closes #19573
| * | | | Merge branch '15343-build-settiings' into 'master' Rémy Coutable2016-07-203-6/+31
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolve "Move Build badges settings to Builds page (or Builds settings)" ## What does this MR do? Removes pipeline settings section from project settings & creates a new pipelines settings page Adds builds badge to pipelines settings page & removes badge page ## Are there points in the code the reviewer needs to double check? All Rails updates -> particularly `builds_controller.rb` and `routes` Spacing needs to be updated across all settings pages and will be in a separate MR (https://gitlab.com/gitlab-org/gitlab-ce/issues/19827) ## What are the relevant issue numbers? Closes #15343 Part of #18920 ## Screenshots (if relevant) ![Screen_Shot_2016-07-19_at_5.47.29_AM](/uploads/48e6d203de4cbe0b697280128695d980/Screen_Shot_2016-07-19_at_5.47.29_AM.png) ![Screen_Shot_2016-07-14_at_9.25.13_AM](/uploads/59118440f3e7bb903f44260abb119376/Screen_Shot_2016-07-14_at_9.25.13_AM.png) See merge request !5244
| | * | | | Change how we style redirect_toKamil Trzcinski2016-07-201-3/+1
| | | | | |
| | * | | | Use flash[:notice] onlyKamil Trzcinski2016-07-201-2/+1
| | | | | |
| | * | | | Create PipelinesSettingsController for showing settings pageKamil Trzcinski2016-07-203-27/+35
| | | | | |
| | * | | | Fix updating settings for pipelines15343-build-settiingsKamil Trzcinski2016-07-201-14/+8
| | | | | |
| | * | | | Merge remote-tracking branch 'origin/master' into 15343-build-settiingsKamil Trzcinski2016-07-203-5/+17
| | |\ \ \ \ | | | | |/ / | | | |/| |