Commit 2f75375f authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Move more package files to ee/ directory

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent d67219f4
......@@ -131,7 +131,6 @@ class Project < ActiveRecord::Base
has_one :last_event, -> {order 'events.created_at DESC'}, class_name: 'Event'
has_many :boards, before_add: :validate_board_limit
has_many :packages, class_name: 'Packages::Package'
# Project services
has_one :campfire_service
......
......@@ -183,7 +183,6 @@ class ProjectPolicy < BasePolicy
enable :read_commit_status
enable :read_build
enable :read_container_image
enable :read_packages
enable :read_pipeline
enable :read_pipeline_schedule
enable :read_environment
......
......@@ -38,6 +38,7 @@ module EE
has_many :protected_environments
has_many :software_license_policies, inverse_of: :project, class_name: 'SoftwareLicensePolicy'
accepts_nested_attributes_for :software_license_policies, allow_destroy: true
has_many :packages, class_name: 'Packages::Package'
has_many :sourced_pipelines, class_name: 'Ci::Sources::Pipeline', foreign_key: :source_project_id
......
......@@ -89,6 +89,7 @@ module EE
enable :read_deploy_board
enable :admin_issue_link
enable :admin_epic_issue
enable :read_packages
end
rule { can?(:developer_access) }.policy do
......
......@@ -19,21 +19,21 @@ FactoryBot.define do
package
trait(:jar) do
file { fixture_file_upload('spec/fixtures/maven/my-app-1.0-20180724.124855-1.jar') }
file { fixture_file_upload('ee/spec/fixtures/maven/my-app-1.0-20180724.124855-1.jar') }
file_name 'my-app-1.0-20180724.124855-1.jar'
file_sha1 '4f0bfa298744d505383fbb57c554d4f5c12d88b3'
file_type 'jar'
end
trait(:pom) do
file { fixture_file_upload('spec/fixtures/maven/my-app-1.0-20180724.124855-1.pom') }
file { fixture_file_upload('ee/spec/fixtures/maven/my-app-1.0-20180724.124855-1.pom') }
file_name 'my-app-1.0-20180724.124855-1.pom'
file_sha1 '19c975abd49e5102ca6c74a619f21e0cf0351c57'
file_type 'pom'
end
trait(:xml) do
file { fixture_file_upload('spec/fixtures/maven/maven-metadata.xml') }
file { fixture_file_upload('ee/spec/fixtures/maven/maven-metadata.xml') }
file_name 'maven-metadata.xml'
file_sha1 '42b1bdc80de64953b6876f5a8c644f20204011b0'
file_type 'xml'
......
......@@ -8,7 +8,6 @@ describe 'Packages' do
before do
sign_in(user)
project.add_developer(user)
stub_packages_config(enabled: true)
end
context 'when there are no packages' do
......
......@@ -30,10 +30,6 @@ module StubGitlabCalls
allow_any_instance_of(Project).to receive(:builds_enabled?).and_return(false)
end
def stub_packages_config(settings)
allow(Gitlab.config.packages).to receive_messages(settings)
end
def stub_container_registry_config(registry_settings)
allow(Gitlab.config.registry).to receive_messages(registry_settings)
allow(Auth::ContainerRegistryAuthenticationService)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment