summaryrefslogtreecommitdiff
path: root/app/controllers/projects/blob_controller.rb
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'jej-22869' into 'security'Douwe Maan2016-11-281-12/+8
| | | | | | | | | | | | | | | | | | Fix information disclosure in `Projects::BlobController#update` It was possible to discover private project names by modifying `from_merge_request`parameter in `Projects::BlobController#update`. This fixes that. - [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) entry added - Tests - [x] Added for this feature/bug - [ ] All builds are passing - [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) https://gitlab.com/gitlab-org/gitlab-ce/issues/22869 See merge request !2023
* Unify anchor link format for MR diff files !7298Yar2016-11-151-1/+1
| | | | | | | | Right now, the following naming scheme for diff files is used: diff-1, diff-2, ... and also we have "internal" format which is file-path-HASH, where HASH is sha1 of file path. Besides, we have HASH_lineA_lineB format to link exact line number in MR diff. It makes sence to unify the way we link diff from outside, while leave "file-path-HASH" format for internal (js) usage. Changes in this commit allow to link diff just by HASH, if we don't want specify exact lines, also it changes "file-path-HASH" and "diff-NUMBER" links in code to this unified format. Inspired by #24010 and !7298
* fixes distinction between renaming a file and updating its content and21092-file-execution-flag-is-not-preserved-when-editing-filestiagonbotelho2016-09-091-6/+4
| | | | refactors update file
* Prevents accidental overwrites of commits from UIFrank West2016-08-151-2/+12
| | | | | | | | | | | | | Currently when a user performs an update of a file through the UI and there has already been a change committed to the file the previous commits will be overwritten without a check to see if the file has been changed. This commit uses the last commit sha at the time the user starts editing the file and compares it with the current sha of the file being edited to ensure they are the same before committing the file. If the shas do not match we throw an exception preventing the commit from the commit from occurring. Fixes #5857
* Add unfold links for Side-by-Side viewTim Masliuchenko2016-08-041-0/+2
|
* renames :file_name to :file_pathtiagonbotelho2016-07-131-2/+2
|
* test for nil params :file_nametiagonbotelho2016-07-121-1/+1
|
* refactors update action to change commit_params with the correct pathtiagonbotelho2016-07-121-4/+5
|
* changes the usasge of path to file_path on blob_controller for ↵tiagonbotelho2016-07-121-4/+4
| | | | compatibillity with the create action
* fixes merge request edit bug where it would generate a cloned file and not ↵tiagonbotelho2016-07-121-5/+0
| | | | remove the previous one
* implements the form for renaming the new filename on the file edit pagetiagonbotelho2016-07-121-0/+1
|
* creates the update_file method in repository.rb and applies changes accordinglytiagonbotelho2016-07-121-1/+0
|
* successfully adds the new version with the updated name on the projects repotiagonbotelho2016-07-121-0/+1
|
* implements the form for renaming the new filename on the file edit pagetiagonbotelho2016-07-121-1/+0
|
* remove prints and useless commentstiagonbotelho2016-07-121-0/+1
|
* successfully adds the new version with the updated name on the projects repotiagonbotelho2016-07-121-1/+0
|
* implements the form for renaming the new filename on the file edit pagetiagonbotelho2016-07-121-0/+1
|
* fixes merge request edit bug where it would generate a cloned file and not ↵tiagonbotelho2016-07-121-0/+5
| | | | remove the previous one
* refactors blob_controllertiagonbotelho2016-07-121-1/+1
|
* creates the update_file method in repository.rb and applies changes accordinglytiagonbotelho2016-07-121-1/+1
|
* implements the form for renaming the new filename on the file edit pagetiagonbotelho2016-07-121-1/+0
|
* remove prints and useless commentstiagonbotelho2016-07-121-1/+1
|
* successfully adds the new version with the updated name on the projects repotiagonbotelho2016-07-121-1/+5
|
* implements the form for renaming the new filename on the file edit pagetiagonbotelho2016-07-121-1/+2
|
* Represent DiffRefs as proper class instead of tuple arrayDouwe Maan2016-07-061-1/+1
|
* Validate presence of essential params for diff renderingissue_19096Ruben Davila2016-06-241-0/+7
| | | | | This will avoid application errors generated by the assumption of the presence of these params.
* Add a `Blob` model that wraps `Gitlab::Git::Blob`rs-blobRobert Speicher2016-02-181-1/+1
| | | | | | | | | | | This allows us to take advantage of Rails' `to_partial_path` to render the correct partial based on the Blob type, rather than cluttering the view with conditionals. It also allows (and will allow in the future) better encapsulation for Blob-related logic which makes sense for our Rails app but might not make as much sense for the core `gitlab_git` library, such as detecting if the blob is an SVG.
* Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into lazy-blobsJacob Vosmaer2016-02-011-4/+6
|\
| * Make sure non-highlighted diffs are still escapedunescaped-diffsDouwe Maan2016-01-221-1/+3
| |
| * Add inline diff markers in highlighted diffs.Douwe Maan2016-01-141-1/+1
| |
| * Reuse existent vars with ref and path. #3945Rubén Dávila2016-01-121-3/+1
| |
| * Change strategy to highlight diffs. #3945Rubén Dávila2016-01-071-2/+5
| | | | | | | | | | Now we apply syntax highlighting to the whole old and new files. This basically help us to highlight adequately multiline content.
| * Apply syntax highlighting when expanding diff plus some refactor. #3945Rubén Dávila2015-12-311-1/+1
| |
* | WIP lazy blobsJacob Vosmaer2016-02-011-0/+3
|/
* Automatically fork a project when not allowed to edit a file.Douwe Maan2015-12-181-77/+17
|
* Default target branch to patch-n when editing file in protected branchDouwe Maan2015-12-081-2/+10
|
* DRY up codedirceu/gitlab-ce-new-merge-request-from-file-editDouwe Maan2015-11-181-30/+24
|
* Add "Start a new merge request" option to every commit formDouwe Maan2015-11-171-24/+29
|
* Merge branch 'master' into dirceu/gitlab-ce-new-merge-request-from-file-editDouwe Maan2015-11-171-1/+1
|\
| * Add ability to create directories in the editorBen Ford2015-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Simply type a name with a `/` directory separator and new directories will be created. This does not do the fancy UI work that github.com does, but it will get the job done. I could not find tests for file creation, so I didn't add a test for this slight behaviour modification. I did test directory traversals though, using both absolute paths like `/tmp/foo.txt` and relative paths like `../../foo.txt`. Neither case escaped the repository, though attempting to traverse with a relative path resulted in a 500 error that did not affect application stability upon reload.
* | Add option to create merge request when editing/creating a fileDirceu Pereira Tiegs2015-10-191-2/+16
|/
* Only render 404 page from /publicinified_404_errorValery Sizov2015-10-131-3/+3
|
* Add directory feature buttonStan Hu2015-10-071-4/+4
| | | | | | | | | | | | | | | | | | Change "+" icon under "Files" section to have three options: * Create file * Upload file * New directory Upload file is no longer accessible from the "Create file" page. Users can now select a target branch in upload file as well. Closes #2799: Fixes a bug where file modes were overwritten after a commit Closes https://github.com/gitlabhq/gitlabhq/issues/8253: Existing files can no longer be overwritten in the "Create file" section. Closes #2557
* Move partial locals out of controllerStan Hu2015-09-171-11/+0
|
* Change the replace placeholder to use the filenamefix-upload-uiStan Hu2015-09-151-0/+11
| | | | | | | | | | | | | | Dynamically adjust placedholder for uploads and fix Dropzone event handlers Override error handler to prevent error messages from being inserted underneath image preview Fix tests Use regexp instead of startsWith for better browser compatibility Remove duplicate code in _replace.html.haml and use one template Remove files upon error and retain alert messages until user adds a new file
* Add "Replace" and "Upload" featuresliyakun2015-09-151-4/+24
| | | | | | | | | | | | | | | | Refactor upload and replace functionality Rename file and move CSS Fix typo Make dropzone a div Remove unnecessary file Change color of "upload existing one" Add missing changes
* Revert "Merge branch 'revert-satellites' into 'master' "Dmitriy Zaporozhets2015-08-111-30/+30
| | | | | This reverts commit 5daf44b7c86e0e2641a902b1da8b01d91fa3dbfa, reversing changes made to 2f706fbd231cabe7a76a5d17ac44285aaaf8592c.
* Revert "Refactor web editor"Dmitriy Zaporozhets2015-08-111-30/+30
| | | | | | This reverts commit dfccb06dda344819989fa8d6a9a3c56c5ca0b65f. Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Refactor web editorrefactor-web-editorDmitriy Zaporozhets2015-06-051-30/+30
| | | | | | | | | | * fix problem with editing non-master branch * before commit make sure branch exists * dont allow user change file in one branch and commit to another existing branch * remove a lot of code duplication * remove outdated statellite errors Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Fixed the Rails/ActionFilter copJeroen van Baarsen2015-04-201-9/+9
| | | | Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>