mirror of
https://github.com/gitlabhq/gitlabhq.git
synced 2025-07-23 00:45:28 +00:00
12 lines
290 B
Ruby
12 lines
290 B
Ruby
# frozen_string_literal: true
|
|
|
|
class ContainerRepositoryPolicy < BasePolicy
|
|
delegate { @subject.project }
|
|
|
|
condition(:protected_for_delete) { @subject.protected_from_delete_by_tag_rules?(@user) }
|
|
|
|
rule { protected_for_delete }.policy do
|
|
prevent :destroy_container_image
|
|
end
|
|
end
|