Commit 1e78cbaf authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch '341270-use-allowlist-for-import-part-3' into 'master'

Use allowlist of allowed attributes for imported models (part 3)

See merge request gitlab-org/gitlab!71296
parents ec525886 3f308239
......@@ -9,8 +9,11 @@ RSpec.describe Gitlab::ImportExport::AttributesPermitter do
let(:attributes_permitter) { described_class.new }
where(:relation_name, :permitted_attributes_defined) do
:push_rule | true
:issuable_sla | false
:push_rule | true
:issuable_sla | false
:unprotect_access_levels | true
:deploy_access_levels | true
:protected_environments | true
end
with_them do
......
......@@ -225,6 +225,53 @@ included_attributes:
- :updated_at
- :start_date
- :state
protected_branches:
- :project_id
- :name
- :created_at
- :updated_at
- :code_owner_approval_required
- :allow_force_push
protected_tags:
- :project_id
- :name
- :created_at
- :updated_at
create_access_levels:
- :access_level
- :created_at
- :updated_at
- :user_id
- :group_id
merge_access_levels:
- :access_level
- :created_at
- :updated_at
- :user_id
- :group_id
push_access_levels:
- :access_level
- :created_at
- :updated_at
- :user_id
- :group_id
releases:
- :tag
- :description
- :project_id
- :author_id
- :created_at
- :updated_at
- :name
- :sha
- :released_at
links:
- :url
- :name
- :created_at
- :updated_at
- :filepath
- :link_type
# Do not include the following attributes for the models specified.
excluded_attributes:
......@@ -593,3 +640,20 @@ ee:
- :reject_unsigned_commits
- :commit_committer_check
- :regexp_uses_re2
unprotect_access_levels:
- :access_level
- :user_id
- :group_id
deploy_access_levels:
- :created_at
- :updated_at
- :access_level
- :user_id
- :group_id
protected_environments:
- :project_id
- :group_id
- :name
- :created_at
- :updated_at
......@@ -92,6 +92,13 @@ RSpec.describe Gitlab::ImportExport::AttributesPermitter do
:boards | true
:custom_attributes | true
:labels | true
:protected_branches | true
:protected_tags | true
:create_access_levels | true
:merge_access_levels | true
:push_access_levels | true
:releases | true
:links | true
end
with_them do
......
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