Commit Graph

695 Commits

Author SHA1 Message Date
Douwe Maan 4d64a32c88 Merge branch 'feature/ldap-sync-edgecases' into 'master'
LDAP Sync blocked user edgecases

Allow GitLab admins to block otherwise valid GitLab LDAP users
(https://gitlab.com/gitlab-org/gitlab-ce/issues/3462)

Based on the discussion on the original issue, we are going to differentiate "normal" block operations to the ldap automatic ones in order to make some decisions when its one or the other.

Expected behavior:

- [x] "ldap_blocked" users respond to both `blocked?` and `ldap_blocked?`
- [x] "ldap_blocked" users can't be unblocked by the Admin UI
- [x] "ldap_blocked" users can't be unblocked by the API
- [x] Block operations that are originated from LDAP synchronization will flag user as "ldap_blocked"
- [x] Only "ldap_blocked" users will be automatically unblocked by LDAP synchronization
- [x] When LDAP identity is removed, we should convert `ldap_blocked` into `blocked`
 
Mockup for the Admin UI with both "ldap_blocked" and normal "blocked" users:
![image](/uploads/4f56fc17b73cb2c9e2a154a22e7ad291/image.png)

There will be another MR for the EE version.

See merge request !2242
2016-01-14 11:00:08 +00:00
Rémy Coutable 33ea09bdf9 Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into fix/private-references 2016-01-13 19:46:38 +01:00
Rémy Coutable 0c10aee596 Ensure the API doesn't return notes that the current user shouldn't see 2016-01-13 19:42:36 +01:00
Douwe Maan 9664424cab Merge branch 'ci/api-projects' into 'master'
Extend projects API with CI data

Reference #4264 

See merge request !2303
2016-01-13 13:32:35 +00:00
Gabriel Mazetto ac6a10f3e8 Codestyle changes 2016-01-12 12:29:10 -02:00
Tomasz Maczukin fc4108b38b Modify CI features in projects API 2016-01-11 15:27:20 +01:00
Robert Speicher af68897acd Merge branch 'api-project-upload' into 'master'
Add API project upload endpoint

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

See merge request !2329
2016-01-08 20:29:43 +00:00
Gabriel Mazetto 6e7db8e23e Prevent ldap_blocked users from being blocked/unblocked by the API 2016-01-08 16:26:04 -02:00
Robert Schilling 4c90ed52fe Delete tag via API 2016-01-08 10:10:04 +01:00
Douwe Maan 1886d727f7 Add API project upload endpoint 2016-01-07 13:37:14 +01:00
Tomasz Maczukin ba9799b42f Update ./doc/api 2016-01-07 10:39:02 +01:00
Douwe Maan c0849101e6 Merge branch 'master' into merge-when-build-succeeds-unchecked 2016-01-06 13:06:01 +01:00
Dmitriy Zaporozhets 797c2326c3 Merge branch 'feature/detailed-user-endpoint' of https://gitlab.com/Michi302/gitlab-ce 2016-01-06 10:51:17 +01: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
Tomasz Maczukin 0a21731e3b Add ci fields in project create/update feature API 2016-01-05 15:00:25 +01:00
Tomasz Maczukin f60bceb988 Add CI data to projcet entity 2016-01-05 13:21:21 +01:00
Stan Hu 086cfc8685 Fix API project lookups when querying with a namespace with dots
Attempting to use the /projects/:id API by specifying :id in
"namespace/project" format would always result in a 404 if the namespace
contained a dot.

The reason? From http://guides.rubyonrails.org/routing.html#specifying-constraints:

"By default the :id parameter doesn't accept dots - this is because the dot is
used as a separator for formatted routes. If you need to use a dot within an
:id add a constraint which overrides this - for example id: /[^\/]+/ allows
anything except a slash."

Closes https://github.com/gitlabhq/gitlabhq/issues/9573
2016-01-03 15:08:44 -08:00
Michi302 141b8b67ff Make single user API endpoint return Entities::User instead of Entities::UserBasic 2015-12-28 15:50:44 +01:00
Valery Sizov 83d42c1518 Revert upvotes and downvotes params to MR API 2015-12-28 11:41:16 +02:00
Stan Hu 5a8c65b508 Add API support for looking up a user by username
Needed to support Huboard
2015-12-24 07:57:13 -08: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
Stan Hu 301a30e0ea Add project permissions to all project API endpoints
This standardizes all the project API formats. Also needed to support Huboard.
2015-12-22 10:58:23 -08:00
Douwe Maan d9c82d679f Automatically fork a project when not allowed to edit a file. 2015-12-18 10:03:34 +01:00
Dmitriy Zaporozhets 9ede66f619 Merge branch 'api-support-starred-projects' into 'master'
Api support for requesting starred projects for user

Closes #4112

Note: probably targets the wrong release in the `CHANGELOG`, though 8.4 was not there yet

See merge request !2127
2015-12-16 22:49:28 +00:00
Zeger-Jan van de Weg c36821df9f Api support for requesting starred projects for user
Fixes #4112
2015-12-16 21:46:00 +01:00
Rubén Dávila 40c0b4b22a Fix Rubocop complain. 2015-12-16 14:51:25 -05:00
Dmitriy Zaporozhets b8570576e8
Merge branch 'add-open-issues-count-to-api' of https://gitlab.com/stanhu/gitlab-ce
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-12-16 16:08:35 +01:00
Gabriel Mazetto b5291f9599 Fixed Rubocop offenses 2015-12-15 00:53:52 -02:00
Stan Hu 3efae53bd7 Add open_issues_count to project API
This is needed to support Huboard and a generally useful value.
2015-12-11 23:17:36 -08:00
Kamil Trzcinski 3578153d3e Fix triggers tests 2015-12-11 18:02:09 +01:00
Kamil Trzcinski 3d9ce37a48 Reimplement Trigger API 2015-12-11 18:02:09 +01:00
Kamil Trzcinski e80e3f5372 Migrate CI::Project to Project 2015-12-11 18:02:09 +01:00
Kamil Trzcinski 2988e1fbf5 Migrate CI::Services and CI::WebHooks to Services and WebHooks 2015-12-10 16:04:08 +01:00
Douwe Maan 8fb49a4b70 Merge branch 'master' into merge-if-green
# Conflicts:
#	app/views/projects/merge_requests/widget/_heading.html.haml
#	app/views/projects/merge_requests/widget/open/_accept.html.haml
2015-12-08 22:34:03 +01:00
Douwe Maan 15925290ee Merge branch 'master' into ui/dashboard-new-issue 2015-12-08 15:22:04 +01:00
Douwe Maan 75486f09c4 Merge branch 'master' into zj/gitlab-ce-merge-if-green 2015-12-08 13:43:45 +01:00
Douwe Maan 5a9a8d03a7 Merge branch 'master' into ui/dashboard-new-issue 2015-12-07 17:12:29 +01:00
Douwe Maan 8f817c7b08 Add API group projects endpoint. 2015-12-07 17:10:40 +01:00
Zeger-Jan van de Weg 0e96d6eb10 Merge branch 'master' into merge-if-green 2015-12-07 10:06:07 +01:00
Stan Hu 631a30276e Fix API setting of 'public' attribute to false will make a project private
Closes #3864
2015-12-05 17:39:36 -08:00
Dmitriy Zaporozhets 4de7f32c60 Merge branch 'extend-events-api' 2015-12-04 13:51:30 +01:00
Dmitriy Zaporozhets 3227a5ead2
Extent Event and Note API
* add note to Events API
* add author section to Events API
* add noteable_id and noteable_type to Notes API

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-12-04 12:22:50 +01:00
Dmitriy Zaporozhets 0b68a0e79e
Add API endpoint to fetch merge request commits list
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-12-04 11:08:10 +01:00
Zeger-Jan van de Weg a7682f8775 Specs for 'Merge When Build Succeeds' 2015-12-02 13:27:16 +01:00
Zeger-Jan van de Weg 8608c6325e Refactor MergeWhenBuildSucceedsService and incorporate feedback 2015-11-23 10:11:54 +01:00
Robert Speicher b166ee6b1d Merge branch 'fix-award-emoji-api' into 'master'
Add upvote/downvote fields to merge request and note API to preserve compatibility

As discussed in !1825 we should not break the API compatibility.

* This MR adds the fields `upvotes`/`downvotes` to the merge request API again, which always return `0`.
* Add the fields `upvote`/`downvote` to the notes API, which always return `false`

This behavior is documented in the API docs.

See merge request !1867
2015-11-22 03:45:15 +00:00
Robert Schilling 04a3d27eab Allow editing a release in API via PUT method 2015-11-21 22:34:53 +01:00
Robert Schilling 3ea05c5b5b Only allow to create a release if it does not exist yet 2015-11-21 22:24:34 +01:00
Robert Schilling 26b12e2c37 Add upvote/downvote fields to merge request and note API to preserve compatibility 2015-11-21 21:36:31 +01:00
Robert Schilling 6f7e90f6db Use POST to create a new release instead of PUT 2015-11-21 18:51:41 +01:00