Коммит cbfa0961 создал по автору Simon Knox's avatar Simon Knox
Просмотр файлов

Merge branch 'revert-0e663188' into 'master'

Revert "Merge branch '337611-update-user-cap-description' into 'master'"

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/119944



Merged-by: default avatarSimon Knox <simon@gitlab.com>
Approved-by: default avatarStanislav Lashmanov <slashmanov@gitlab.com>
Approved-by: default avatarSimon Knox <simon@gitlab.com>
Co-authored-by: default avatarAmmar Alakkad <aalakkad@gitlab.com>
владельцы 23d173c2 d2426435
...@@ -58,8 +58,6 @@ export default { ...@@ -58,8 +58,6 @@ export default {
'emailRestrictions', 'emailRestrictions',
'afterSignUpText', 'afterSignUpText',
'pendingUserCount', 'pendingUserCount',
'projectSharingHelpLink',
'groupSharingHelpLink',
], ],
data() { data() {
return { return {
...@@ -83,8 +81,6 @@ export default { ...@@ -83,8 +81,6 @@ export default {
supportedSyntaxLinkUrl: this.supportedSyntaxLinkUrl, supportedSyntaxLinkUrl: this.supportedSyntaxLinkUrl,
emailRestrictions: this.emailRestrictions, emailRestrictions: this.emailRestrictions,
afterSignUpText: this.afterSignUpText, afterSignUpText: this.afterSignUpText,
projectSharingHelpLink: this.projectSharingHelpLink,
groupSharingHelpLink: this.groupSharingHelpLink,
}, },
}; };
}, },
...@@ -224,7 +220,7 @@ export default { ...@@ -224,7 +220,7 @@ export default {
), ),
userCapLabel: s__('ApplicationSettings|User cap'), userCapLabel: s__('ApplicationSettings|User cap'),
userCapDescription: s__( userCapDescription: s__(
'ApplicationSettings|After the instance reaches the user cap, any user who is added or requests access must be approved by an administrator. Leave blank for an unlimited user cap. If you change the user cap to unlimited, you must re-enable %{projectSharingLinkStart}project sharing%{projectSharingLinkEnd} and %{groupSharingLinkStart}group sharing%{groupSharingLinkEnd}.', 'ApplicationSettings|After the instance reaches the user cap, any user who is added or requests access must be approved by an administrator. Leave blank for unlimited.',
), ),
domainDenyListGroupLabel: s__('ApplicationSettings|Domain denylist'), domainDenyListGroupLabel: s__('ApplicationSettings|Domain denylist'),
domainDenyListLabel: s__('ApplicationSettings|Enable domain denylist for sign-ups'), domainDenyListLabel: s__('ApplicationSettings|Enable domain denylist for sign-ups'),
...@@ -313,7 +309,6 @@ export default { ...@@ -313,7 +309,6 @@ export default {
<gl-form-group <gl-form-group
:label="$options.i18n.userCapLabel" :label="$options.i18n.userCapLabel"
:description="$options.i18n.userCapDescription" :description="$options.i18n.userCapDescription"
data-testid="user-cap-form-group"
> >
<gl-form-input <gl-form-input
v-model="form.userCap" v-model="form.userCap"
...@@ -321,17 +316,6 @@ export default { ...@@ -321,17 +316,6 @@ export default {
name="application_setting[new_user_signups_cap]" name="application_setting[new_user_signups_cap]"
data-testid="user-cap-input" data-testid="user-cap-input"
/> />
<template #description>
<gl-sprintf :message="$options.i18n.userCapDescription">
<template #projectSharingLink="{ content }">
<gl-link :href="projectSharingHelpLink" target="_blank">{{ content }}</gl-link>
</template>
<template #groupSharingLink="{ content }">
<gl-link :href="groupSharingHelpLink" target="_blank">{{ content }}</gl-link>
</template>
</gl-sprintf>
</template>
</gl-form-group> </gl-form-group>
<gl-form-group :label="$options.i18n.minimumPasswordLengthLabel"> <gl-form-group :label="$options.i18n.minimumPasswordLengthLabel">
......
...@@ -580,9 +580,7 @@ def signup_form_data ...@@ -580,9 +580,7 @@ def signup_form_data
supported_syntax_link_url: 'https://github.com/google/re2/wiki/Syntax', supported_syntax_link_url: 'https://github.com/google/re2/wiki/Syntax',
email_restrictions: @application_setting.email_restrictions.to_s, email_restrictions: @application_setting.email_restrictions.to_s,
after_sign_up_text: @application_setting[:after_sign_up_text].to_s, after_sign_up_text: @application_setting[:after_sign_up_text].to_s,
pending_user_count: pending_user_count, pending_user_count: pending_user_count
project_sharing_help_link: help_page_path('user/group/access_and_permissions', anchor: 'prevent-a-project-from-being-shared-with-groups'),
group_sharing_help_link: help_page_path('user/group/access_and_permissions', anchor: 'prevent-group-sharing-outside-the-group-hierarchy')
} }
end end
end end
......
...@@ -5328,7 +5328,7 @@ msgstr "" ...@@ -5328,7 +5328,7 @@ msgstr ""
msgid "ApplicationSettings|After sign-up text" msgid "ApplicationSettings|After sign-up text"
msgstr "" msgstr ""
   
msgid "ApplicationSettings|After the instance reaches the user cap, any user who is added or requests access must be approved by an administrator. Leave blank for an unlimited user cap. If you change the user cap to unlimited, you must re-enable %{projectSharingLinkStart}project sharing%{projectSharingLinkEnd} and %{groupSharingLinkStart}group sharing%{groupSharingLinkEnd}." msgid "ApplicationSettings|After the instance reaches the user cap, any user who is added or requests access must be approved by an administrator. Leave blank for unlimited."
msgstr "" msgstr ""
   
msgid "ApplicationSettings|Allowed domains for sign-ups" msgid "ApplicationSettings|Allowed domains for sign-ups"
import { GlButton, GlModal, GlLink } from '@gitlab/ui'; import { GlButton, GlModal } from '@gitlab/ui';
import { within } from '@testing-library/dom'; import { within } from '@testing-library/dom';
import { shallowMount, mount, createWrapper } from '@vue/test-utils'; import { shallowMount, mount, createWrapper } from '@vue/test-utils';
import { stubComponent } from 'helpers/stub_component'; import { stubComponent } from 'helpers/stub_component';
...@@ -36,7 +36,6 @@ describe('Signup Form', () => { ...@@ -36,7 +36,6 @@ describe('Signup Form', () => {
const findDenyListRawInputGroup = () => wrapper.findByTestId('domain-denylist-raw-input-group'); const findDenyListRawInputGroup = () => wrapper.findByTestId('domain-denylist-raw-input-group');
const findDenyListFileInputGroup = () => wrapper.findByTestId('domain-denylist-file-input-group'); const findDenyListFileInputGroup = () => wrapper.findByTestId('domain-denylist-file-input-group');
const findUserCapInput = () => wrapper.findByTestId('user-cap-input'); const findUserCapInput = () => wrapper.findByTestId('user-cap-input');
const findUserCapFormGroup = () => wrapper.findByTestId('user-cap-form-group');
const findModal = () => wrapper.findComponent(GlModal); const findModal = () => wrapper.findComponent(GlModal);
afterEach(() => { afterEach(() => {
...@@ -212,19 +211,4 @@ describe('Signup Form', () => { ...@@ -212,19 +211,4 @@ describe('Signup Form', () => {
}); });
}); });
}); });
describe('rendering help links within user cap description', () => {
beforeEach(() => {
mountComponent({ mountFn: mount });
});
it('renders projectSharingHelpLink and groupSharingHelpLink', () => {
const [projectSharingLink, groupSharingLink] = findUserCapFormGroup().findAllComponents(
GlLink,
).wrappers;
expect(projectSharingLink.attributes('href')).toBe(mockData.projectSharingHelpLink);
expect(groupSharingLink.attributes('href')).toBe(mockData.groupSharingHelpLink);
});
});
}); });
...@@ -22,8 +22,6 @@ export const rawMockData = { ...@@ -22,8 +22,6 @@ export const rawMockData = {
passwordLowercaseRequired: 'true', passwordLowercaseRequired: 'true',
passwordUppercaseRequired: 'true', passwordUppercaseRequired: 'true',
passwordSymbolRequired: 'true', passwordSymbolRequired: 'true',
projectSharingHelpLink: 'project-sharing/help/link',
groupSharingHelpLink: 'group-sharing/help/link',
}; };
export const mockData = { export const mockData = {
...@@ -50,6 +48,4 @@ export const mockData = { ...@@ -50,6 +48,4 @@ export const mockData = {
passwordLowercaseRequired: true, passwordLowercaseRequired: true,
passwordUppercaseRequired: true, passwordUppercaseRequired: true,
passwordSymbolRequired: true, passwordSymbolRequired: true,
projectSharingHelpLink: 'project-sharing/help/link',
groupSharingHelpLink: 'group-sharing/help/link',
}; };
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать