Commit 182ea073 authored by Jan Provaznik's avatar Jan Provaznik

Merge branch '322101-feature-flag-rollout-of-validate_namespace_parent_type' into 'master'

Validate the parent of a personal namespace/Group by default

See merge request gitlab-org/gitlab!70365
parents 47d507c9 5dd7051f
......@@ -77,7 +77,7 @@ class Namespace < ApplicationRecord
validates :max_artifacts_size, numericality: { only_integer: true, greater_than: 0, allow_nil: true }
validate :validate_parent_type, if: -> { Feature.enabled?(:validate_namespace_parent_type) }
validate :validate_parent_type, if: -> { Feature.enabled?(:validate_namespace_parent_type, default_enabled: :yaml) }
validate :nesting_level_allowed
validate :changing_shared_runners_enabled_is_allowed
validate :changing_allow_descendants_override_disabled_shared_runners_is_allowed
......
......@@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/322101
milestone: '13.10'
type: development
group: group::access
default_enabled: false
default_enabled: true
......@@ -794,3 +794,22 @@ If a user sees a 404 when they would normally expect access, and the problem is
In viewing the log entries, compare the `remote.ip` with the list of
[allowed IPs](#restrict-group-access-by-ip-address) for the group.
### Validation errors on namespaces and groups
[GitLab 14.4 and later](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/70365) performs
the following checks when creating or updating namespaces or groups:
- Namespaces must not have parents.
- Group parents must be groups and not namespaces.
You can disable the validation if GitLab shows the following errors:
- `A user namespace cannot have a parent`.
- `A group cannot have a user namespace as its parent`.
To disable the validation,
[disable the `validate_namespace_parent_type` flag](../../administration/feature_flags.md).
In the unlikely event that you had to disable this feature flag to prevent errors,
[contact Support](https://about.gitlab.com/support/) so that we can improve this validation.
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