Commit df5a6a0b authored by Aleksei Lipniagov's avatar Aleksei Lipniagov

Merge branch 'cablett-parent-namespace-error-message-tweak' into 'master'

Modify error message for clarity

See merge request gitlab-org/gitlab!72658
parents 60ae9dea cba99501
......@@ -566,7 +566,7 @@ class Namespace < ApplicationRecord
end
if user_namespace?
errors.add(:parent_id, _('cannot not be used for user namespace'))
errors.add(:parent_id, _('cannot be used for user namespace'))
elsif group_namespace?
errors.add(:parent_id, _('user namespace cannot be the parent of another namespace')) if parent.user_namespace?
end
......
......@@ -39886,6 +39886,9 @@ msgstr ""
msgid "cannot be modified"
msgstr ""
msgid "cannot be used for user namespace"
msgstr ""
msgid "cannot block others"
msgstr ""
......@@ -39901,9 +39904,6 @@ msgstr ""
msgid "cannot merge"
msgstr ""
msgid "cannot not be used for user namespace"
msgstr ""
msgid "ciReport|%{degradedNum} degraded"
msgstr ""
......
......@@ -60,10 +60,10 @@ RSpec.describe Namespace do
ref(:project_sti_name) | ref(:user_sti_name) | 'project namespace cannot be the parent of another namespace'
ref(:project_sti_name) | ref(:group_sti_name) | 'project namespace cannot be the parent of another namespace'
ref(:project_sti_name) | ref(:project_sti_name) | 'project namespace cannot be the parent of another namespace'
ref(:group_sti_name) | ref(:user_sti_name) | 'cannot not be used for user namespace'
ref(:group_sti_name) | ref(:user_sti_name) | 'cannot be used for user namespace'
ref(:group_sti_name) | ref(:group_sti_name) | nil
ref(:group_sti_name) | ref(:project_sti_name) | nil
ref(:user_sti_name) | ref(:user_sti_name) | 'cannot not be used for user namespace'
ref(:user_sti_name) | ref(:user_sti_name) | 'cannot be used for user namespace'
ref(:user_sti_name) | ref(:group_sti_name) | 'user namespace cannot be the parent of another namespace'
ref(:user_sti_name) | ref(:project_sti_name) | nil
end
......
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