Commit graph

10 commits

Author SHA1 Message Date
Krasimir Angelov
241ba4be79 Allow guests users to access project releases
This is step one of resolving
https://gitlab.com/gitlab-org/gitlab-ce/issues/56838.

Here is what changed:
- Revert the security fix from bdee9e8412.
- Do not leak repository information (tag name, commit) to guests in API
responses.
- Do not include links to source code in API responses for users that do
not have download_code access.
- Show Releases in sidebar for guests.
- Do not display links to source code under Assets for users that do not
have download_code access.

GET ':id/releases/:tag_name' still do not allow guests to access
releases. This is to prevent guessing tag existence.
2019-05-03 13:29:20 +00:00
Rémy Coutable
3a2abc1d50
Enable the Layout/ExtraSpacing cop
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-01-24 13:05:45 +01:00
Shinya Maeda
9b823af4fd Remove releases_page feature flag
We introduced releases_page feature flag.
Given this feature is deemed stable, we should remove
this flag before 19th.
2019-01-11 13:26:09 +09:00
Shinya Maeda
df7ed9eef2 Add unique constraint to release and url
Fix coding style

Improve coding style

Decouple UPDATE and DELETE operations of asset links

Rename links_attributes to assets:links

Rename exposed param and updated spec
2019-01-04 22:17:03 +09:00
Shinya Maeda
66755c9ed5 Support CURD operation for release asset links
- Add Releases::Links model
- Expose it in release API
- Add integration tests
2019-01-04 22:17:02 +09:00
Shinya Maeda
8f1e96c89b Add spec for Release API
Add spec for all release API - GET, POST, PUT, DELETE.
Also, fixes some minior bugs.
2018-12-31 14:35:57 +09:00
Shinya Maeda
dc8a8c7d99 Add delete method in Release API
Introduce DELETE endpoint in Release API
2018-12-31 14:35:14 +09:00
Alessio Caiazza
6a2decf545 Refactor Release services
CreateReleaseService and UpdateReleaseService now takes all the release
attributes as constructor parameters. This will simplify attribute
expansion
2018-12-31 14:34:15 +09:00
Alessio Caiazza
a7aaad96f3 ReleasesFinder will always return a relation 2018-12-31 12:05:56 +09:00
Alessio Caiazza
1ea2d9faa5 Add releases API
This commit introduces Releases API under /api/v4/projects/:id/releases

* We are introducing release policies at project level.
* We are deprecating releases changes from tags, both api and web
interface.
* Tags::CreateService no longer create a release

This feature is controlled by :releases_page feature flag
2018-12-31 12:05:56 +09:00