Class: Releases::EvidencePolicy

Inherits:
BasePolicy
  • Object
show all
Defined in:
app/policies/releases/evidence_policy.rb

Instance Method Summary collapse

Instance Method Details

#allowed_to_read_evidenceObject

evidence.summary includes the following entities:

  • Release

  • git-tag (Repository)

  • Project

  • Milestones

  • Issues

TODO: remove issues from this check: gitlab.com/gitlab-org/gitlab/-/issues/259674


19
20
21
22
23
24
25
# File 'app/policies/releases/evidence_policy.rb', line 19

condition(:allowed_to_read_evidence) do
  can?(:read_release) &&
    can?(:download_code) &&
    can?(:read_project) &&
    can?(:read_milestone) &&
    can?(:read_issue)
end

#external_authorization_service_disabledObject

Currently, we don't support release evidence for the GitLab instances that enables external authorization services. See gitlab.com/gitlab-org/gitlab/issues/121930.


31
32
33
# File 'app/policies/releases/evidence_policy.rb', line 31

condition(:external_authorization_service_disabled) do
  !Gitlab::ExternalAuthorization::Config.enabled?
end