Skip to content

Render special references for release entities

What does this MR do?

Currently we render a lot of the release attributes in the context of the current user (https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/api/entities/release.rb#L45-51) but we always render the descripton_html withiut taking into account the current user.

This MR changes this and provides current user when generating release entity json representation so that we can render special references if they have enough access.

Related to #32882 (closed)

Screenshots

Before

image

After

image

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Krasimir Angelov

Merge request reports

Loading