Commit Graph
689 Commits
Author SHA1 Message Date
Kamil Trzcinski 447f1e30db Limit guest access builds
This solves https://dev.gitlab.org/gitlab/gitlabhq/issues/2646

1. This MR simplifies CI permission model:
    - read_build: allows to read a list of builds, artifacts and trace
    - update_build: allows to cancel and retry builds
    - admin_build: allows to manage triggers, runners and variables
    - read_commit_status: allows to read a list of commit statuses (including the status of a build, but doesn't allow to see a build details)
    - create_commit_status: allows to create a new commit status using API

2. I do make sure that the proper permissions are used in all places where the CI can be shown.

3. Add the `read_build` ability if user is anonymous or guest and allow_guest_to_access_builds is enabled.

4. Add CI setting: public_builds.

5. The artifacts specific permission are removed, since they are covered by `*_build`.
2016-02-08 20:27:24 +01:00
Robert SpeicherandRobert Speicher ff1e0ecfc6 Merge branch 'mr-merge-base' into 'master'
Correctly determine MR diff base when MR has merge conflicts

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/12779

See merge request !2632
2016-01-31 19:26:59 -05:00
Robert SpeicherandRobert Speicher 3d687ec316 Merge branch 'highlight-blame' into 'master'
Fix highlighting in blame view.

See merge request !2630
2016-01-31 19:26:59 -05:00
Robert SpeicherandRobert Speicher 80814cbd04 Merge branch 'fix-import-redirect-loop' into 'master'
Fix import redirect loop

Fixes #11864 

See merge request !2606
2016-01-25 17:05:49 -08:00
Robert SpeicherandRobert Speicher 13a7808242 Merge branch 'unescaped-diffs' into 'master'
Make sure non-highlighted diffs are still escaped

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/12521

See merge request !2544
2016-01-21 17:37:49 -08:00
Robert SpeicherandRobert Speicher eebb691cb6 Merge branch 'issue_3945' into 'master'
Add syntax highlighting to diff view

Closes #3945

See merge request !2109
2016-01-20 16:56:13 -05:00
Robert SpeicherandRobert Speicher 1f1eed47fb Merge branch 'fix-autocomplete-new-issues' into 'master'
Fix autocomplete for new issues/MRs/snippets

Fixes gitlab-org/gitlab-ce#8067

See merge request !2446
2016-01-15 15:59:48 -05:00
Grzegorz Bizon 6b2f38f39a Fix nonexistent method in artifacts controller 2016-01-15 13:48:29 +01:00
Andrew JohnsonandGrzegorz Bizon f66f9e95bf Give reporters the ability to download artifacts.
Also fix a few places where page_404 should be render_404.
2016-01-15 12:01:19 +01:00
Grzegorz Bizon 6b0a43aff3 Improve readability of artifacts browser Entry related code 2016-01-14 12:48:17 +01:00
Grzegorz Bizon 487b0a026f Improvements, readability for artifacts browser 2016-01-14 12:48:16 +01:00
Grzegorz Bizon e9c2628220 Check if file exists in metadata in download action 2016-01-14 12:48:16 +01:00
Grzegorz Bizon 09a4a5aff8 Render only valid paths in artifacts metadata
In this version we will support only relative paths in artifacts
metadata. Support for absolute paths will be introduced later.
2016-01-14 12:48:16 +01:00
Grzegorz Bizon 61fb47a432 Simplify implementation of build artifacts browser (refactoring) 2016-01-14 12:48:15 +01:00
Grzegorz Bizon cd3b8bbd2f Add method that checks if path exists in StringPath 2016-01-14 12:48:15 +01:00
Grzegorz Bizon a5e1905d28 Render 404 when artifacts path is invalid 2016-01-14 12:48:15 +01:00
Grzegorz Bizon a7f99b67a0 Extract artifacts metadata implementation to separate class 2016-01-14 12:48:15 +01:00
Grzegorz Bizon 3de8a4620a Parse artifacts metadata stored in JSON format 2016-01-14 12:48:15 +01:00
Grzegorz Bizon 447f56036e Use metadata stored in artifacats metadata file 2016-01-14 12:48:14 +01:00
Grzegorz Bizon 662f4b9e1d Add artifacts metadata uploader filed
Artifacts metadata field will be used to store a filename of gzipped
file containing metadata definition for given artifacts archive.
2016-01-14 12:48:14 +01:00
Grzegorz Bizon 8eeed761a9 Update specs for CI Build, add artifacts? method
`artifacts?` method checks if artifacts archive is available.
2016-01-14 12:48:14 +01:00
Grzegorz Bizon ebd69c5fc1 Remove artifacts metadata column from database 2016-01-14 12:48:13 +01:00
Grzegorz Bizon 5a1faf61f6 Add artifacts browser
This implementation makes it possible to browse artifacts, it
depends on artifacts metadata.
2016-01-14 12:48:13 +01:00
Grzegorz Bizon 80a71576ba Use Gitlab::StringPath in CI build artifacts controller 2016-01-14 12:48:13 +01:00
Grzegorz Bizon f091272f19 Move artifacts controller level up
This reverts nesting artifacts controller in builds module.
2016-01-14 12:48:12 +01:00
Grzegorz Bizon a96d45c694 Add view action to artifacts controller 2016-01-14 12:48:12 +01:00
Grzegorz Bizon 79fe18d9e7 Move build artifacts implementation to separate controller 2016-01-14 12:48:12 +01:00
Rémy Coutable 9d7f88c122 Show referenced MRs & Issues only when the current viewer can access them 2016-01-13 11:59:10 +01:00
Dmitriy Zaporozhets 4443a5f3c7 Add support for ref and path to commits filtering
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-01-07 15:16:11 +01:00
Dmitriy Zaporozhets 9a250ad6d8 Filter commits by search parameter
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-01-07 15:16:10 +01:00
Jacob Vosmaer 41b8a238ce Merge branch 'master' of github.com:gitlabhq/gitlabhq 2016-01-07 12:56:18 +01:00
Douwe Maan c0849101e6 Merge branch 'master' into merge-when-build-succeeds-unchecked 2016-01-06 13:06:01 +01:00
Douwe Maan 07c39c9976 Merge branch 'brunsa2/gitlab-ce-diverging-branch-graphs' into 'master'
Add graphs of commits ahead/behind default branch (by @brunsa2)

Replaces https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/1716

See merge request !2301
2016-01-05 15:44:22 +00:00
Douwe Maan 097faeb481 Get "Merge when build succeeds" to work when commits were pushed to MR target branch while builds were running 2016-01-05 16:30:03 +01:00
Douglas Barbosa Alexandre 567dc62b6d Show 'All' tab by default in the builds page 2016-01-04 10:21:10 -02:00
Robert Speicher 1bda2e43a2 Prevent an XSS warning from the updated Brakeman 2015-12-27 21:19:14 -05:00
Dmitriy Zaporozhets 76b7e24f85 Merge branch 'edit-on-fork' into 'master'
Automatically fork a project when not allowed to edit a file.

Fixes #3215.

To do:

- [ ] Add tests

-----

## "Edit" button on file in a project the user does NOT have write access to

![edit_file](/uploads/7602157420768aef483a6586bba2d164/edit_file.png)

## Clicking will automatically create a fork

![during_fork](/uploads/32f4f5dff9f24ea99522000b0bf881c5/during_fork.png)

## When the fork has been created, the user is returned to the edit page on the original project with a notice

![edit_notice](/uploads/94ed1319404370ff1e9c0d672fb41e03/edit_notice.png)

## The user cannot change the target branch and is informed that editing will start an MR

![edit_footer](/uploads/4da68d4795c7177e575b7c434d16eeae/edit_footer.png)

## Hitting "Commit changes" will commit and start an MR from my fork to the origin project

![Screen_Shot_2015-12-17_at_23.38.08](/uploads/d777a4db6f38a5a1be84031694465bc1/Screen_Shot_2015-12-17_at_23.38.08.png)

-----

## "Create file, "Upload file" and "New directory" buttons in a project the user does NOT have write access to

![new_directory](/uploads/72f556248f30d6652523bbb4be01b3e0/new_directory.png)

## Clicking any of these options will automatically create a fork

![during_fork](/uploads/32f4f5dff9f24ea99522000b0bf881c5/during_fork.png)

## When the fork has been created, the user is returned to the tree page on the original project with a notice

![new_directory_notice](/uploads/a1a3e11308ae0e8f0913fae6813a37ed/new_directory_notice.png)

## Clicking "New directory" again will show the modal. The user cannot change the target branch and is informed that editing will start an MR

![new_dir](/uploads/99ca8cbfb2f70603e352b3fdf67b6281/new_dir.png)

## Hitting "Create directory" will commit and start an MR from my fork to the origin project

![Screen_Shot_2015-12-17_at_23.39.19](/uploads/3713d0235abf831361b803a6198c5bc1/Screen_Shot_2015-12-17_at_23.39.19.png)

cc @dzaporozhets @skyruler

See merge request !2145
2015-12-24 12:24:57 +00:00
Valery Sizov a48dd40a92 base implementation of emoji picker [ci skip] 2015-12-22 23:12:23 +02:00
Douwe Maan c910bca730 Add tests for new functionality 2015-12-21 11:57:51 +01:00
Drew Blessing f177aaa5fa Backport JIRA service 2015-12-18 14:19:48 -06:00
Douwe Maan f4f4a6b530 Fix specs and behavior for LFS files 2015-12-18 16:14:12 +01:00
Douwe Maan d9c82d679f Automatically fork a project when not allowed to edit a file. 2015-12-18 10:03:34 +01:00
Robert Speicher b5230bbe7c Merge branch 'fix-merge-immediately' into 'master'
Fix 'Merge Immediately' button

Fixes #4125

See merge request !2117
2015-12-16 17:51:25 +00:00
Douwe Maan 9908da17c1 Merge branch 'fix-endpoint-not-setting-var' into 'master'
Fix endpoint not setting needed @ci_commit

/cc @DouweM

See merge request !2112
2015-12-16 16:39:35 +00:00
Douwe Maan 5843d09f07 Fix 'Merge Immediately' button 2015-12-16 17:38:58 +01:00
Zeger-Jan van de Weg 95c03f245f Fix endpoint not setting needed @ci_commit 2015-12-16 15:20:53 +01:00
Dmitriy Zaporozhets 40104746d6 Merge remote-tracking branch 'origin/feature/update-rubocop' 2015-12-16 13:44:50 +01:00
Douwe Maan 9451db3819 Merge branch 'rs-issue-4032' into 'master'
Fix note polling

Closes #4032

See merge request !2084
2015-12-15 13:18:13 +00:00
Gabriel Mazetto b5291f9599 Fixed Rubocop offenses 2015-12-15 00:53:52 -02:00
Kamil Trzciński c810234357 Merge branch 'ci-project-migrate' into 'master'
Ci Project migrate

- This doesn't migrate: allow_git_fetch, coverage_regex, timeout. Since this are project configuration settings I would propose to migrate them to `.gitlab-ci.yml`.
- This requires offline migrations.
- It simplifies database models making all CI objects to be attached to: Project.
- It removes Ci::Project, but makes /ci/projects working by adding method: Project.find_by_ci_id for backward compatibility (badges, triggers).
- We should add default `timeout` to Application Settings.
- It misses specs.
- It is based on ci-services-migrate for now.
- It removes CI events.
- It removes administrator CI projects overview.
- It removes CI application settings.

In 8.4 or 8.5 we can remove redundant tables and columns.


See merge request !1987
2015-12-14 10:35:40 +00:00