Skip to content
代码片段 群组 项目
未验证 提交 f5ca4e0f 编辑于 作者: David Pisek's avatar David Pisek 提交者: GitLab
浏览文件

Merge branch '451170-change-create-new-role-to-create-role' into 'master'

Change button text from "Create/add new role" to "Create role"

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



Merged-by: default avatarDavid Pisek <dpisek@gitlab.com>
Approved-by: default avatarVamsi Vempati <vvempati@gitlab.com>
Approved-by: default avatarIlonah Pelaez <ipelaez@gitlab.com>
Approved-by: default avatarDavid Pisek <dpisek@gitlab.com>
Reviewed-by: default avatarVamsi Vempati <vvempati@gitlab.com>
Reviewed-by: default avatarIlonah Pelaez <ipelaez@gitlab.com>
Co-authored-by: default avatarDaniel Tian <dtian@gitlab.com>
No related branches found
No related tags found
无相关合并请求
显示
27 个添加28 个删除
......@@ -241,7 +241,7 @@ end
- Ensure SaaS mode is enabled with `GITLAB_SIMULATE_SAAS=1`.
- Go to any Group that you are an owner of, then go to `Settings -> Roles and Permissions`.
- Select `Add new role` and create a custom role with the permission you have just created.
- Select `New role` and create a custom role with the permission you have just created.
- Go to the Group's `Manage -> Members` page and assign a member to this newly created custom role.
- Next, log-in as that member and ensure that you are able to access the page that the custom ability is intended for.
......
......@@ -53,12 +53,12 @@ Prerequisites:
1. On the left sidebar, select **Search or go to** and find your group.
1. Select **Settings > Roles and Permissions**.
1. Select **Add new role**.
1. Select **New role**.
1. In **Base role to use as template**, select an existing default role.
1. In **Role name**, enter the custom role's title.
1. Optional. In **Description**, enter a description for the custom role.
1. Select the **Permissions** for the new custom role.
1. Select **Create new role**.
1. Select **Create role**.
In **Settings > Roles and Permissions**, the list of all custom roles displays the:
......@@ -77,12 +77,12 @@ After you create a custom role for your self-managed instance, you can assign th
1. On the left sidebar, at the bottom, select **Admin Area**.
1. Select **Settings > Roles and Permissions**.
1. Select **Add new role**.
1. Select **New role**.
1. In **Base role to use as template**, select an existing default role.
1. In **Role name**, enter the custom role's title.
1. Optional. In **Description**, enter a description for the custom role.
1. Select the **Permissions** for the new custom role.
1. Select **Create new role**.
1. Select **Create role**.
In **Settings > Roles and Permissions**, the list of all custom roles displays the:
......
......@@ -14,7 +14,7 @@ export default {
description: s__(
'MemberRole|You can create a custom role by adding specific %{linkStart}permissions to a base role.%{linkEnd}',
),
createRoleText: s__('MemberRole|Create new role'),
newRoleText: s__('MemberRole|New role'),
fetchRolesError: s__('MemberRole|Failed to fetch roles.'),
},
components: {
......@@ -90,7 +90,7 @@ export default {
{{ $options.i18n.title }}
</h1>
<gl-button variant="confirm">
{{ $options.i18n.createRoleText }}
{{ $options.i18n.newRoleText }}
</gl-button>
</div>
......
......@@ -22,7 +22,7 @@ export default {
createError: s__('MemberRole|Failed to create role.'),
createErrorWithReason: s__('MemberRole|Failed to create role: %{error}'),
permissionsFetchError: s__('MemberRole|Could not fetch available permissions.'),
createNewRole: s__('MemberRole|Create new role'),
createRole: s__('MemberRole|Create role'),
cancel: __('Cancel'),
baseRoleLabel: s__('MemberRole|Base role to use as template'),
baseRoleDescription: s__('MemberRole|Select a standard role to add permissions.'),
......@@ -186,7 +186,7 @@ export default {
<template>
<gl-form @submit.prevent="createMemberRole">
<h4 class="gl-mt-0">{{ $options.i18n.createNewRole }}</h4>
<h4 class="gl-mt-0">{{ $options.i18n.createRole }}</h4>
<div class="row">
<gl-form-group
class="col-md-4"
......@@ -248,7 +248,7 @@ export default {
variant="confirm"
class="js-no-auto-disable"
>
{{ $options.i18n.createNewRole }}
{{ $options.i18n.createRole }}
</gl-button>
<gl-button
type="reset"
......
......@@ -9,7 +9,7 @@ export default {
emptyStateDescription: s__(
'MemberRole|Create a custom role with specific abilities by starting with a base role and adding custom permissions. %{linkStart}Learn more about custom roles.%{linkEnd}',
),
createButton: s__('MemberRole|Create new role'),
newRoleButton: s__('MemberRole|New role'),
},
components: {
GlEmptyState,
......@@ -25,7 +25,7 @@ export default {
:title="$options.i18n.emptyStateTitle"
:svg-path="emptyStateSvgPath"
primary-button-link="#"
:primary-button-text="$options.i18n.createButton"
:primary-button-text="$options.i18n.newRoleButton"
>
<template #description>
<gl-sprintf :message="$options.i18n.emptyStateDescription">
......
......@@ -39,7 +39,7 @@ export const FIELDS = [
export default {
i18n: {
addNewRole: s__('MemberRole|Add new role'),
newRole: s__('MemberRole|New role'),
cardTitle: s__('MemberRole|Custom roles'),
deleteRole: s__('MemberRole|Delete role'),
cancel: __('Cancel'),
......@@ -48,7 +48,7 @@ export default {
'MemberRole|To delete the custom role make sure no group member has this custom role',
),
emptyTitle: s__('MemberRole|No custom roles found'),
emptyDescription: s__(`MemberRole|To add a new role select 'Add new role'.`),
emptyDescription: s__(`MemberRole|To create a role select 'New role'.`),
fetchRolesError: s__('MemberRole|Failed to fetch roles.'),
deleteSuccess: s__('MemberRole|Role successfully deleted.'),
deleteError: s__('MemberRole|Failed to delete role.'),
......@@ -203,7 +203,7 @@ export default {
data-testid="add-role"
@click="showCreateMemberForm = true"
>
{{ $options.i18n.addNewRole }}
{{ $options.i18n.newRole }}
</gl-button>
</div>
</template>
......
......@@ -16,13 +16,13 @@
end
def create_role(access_level, name, permissions)
click_button 'Add new role'
click_button 'New role'
select access_level, from: 'Base role to use as template'
fill_in 'Role name', with: name
permissions.each do |permission|
page.check permission
end
click_button 'Create new role'
click_button 'Create role'
end
def created_role(name, id, access_level, permissions)
......
......@@ -21,13 +21,13 @@
end
def create_role(access_level, name, permissions)
click_button 'Add new role'
click_button 'New role'
select access_level, from: 'Base role to use as template'
fill_in 'Role name', with: name
permissions.each do |permission|
page.check permission
end
click_button 'Create new role'
click_button 'Create role'
end
def created_role(name, id, access_level, permissions)
......
......@@ -91,9 +91,8 @@ describe('CustomRolesApp', () => {
expect(findHeader().text()).toContain('Custom roles');
});
it('renders the create new role button', () => {
expect(findButton().exists()).toBe(true);
expect(findButton().text()).toContain('Create new role');
it('renders the new role button', () => {
expect(findButton().text()).toContain('New role');
});
it('renders the number of roles', () => {
......
......@@ -27,7 +27,7 @@ describe('CustomRolesEmptyState', () => {
title: 'Create custom roles',
svgPath: 'empty.svg',
primaryButtonLink: '#',
primaryButtonText: 'Create new role',
primaryButtonText: 'New role',
});
expect(findEmptyState().text()).toContain(
......
......@@ -30944,9 +30944,6 @@ msgstr ""
msgid "MemberRole|Actions"
msgstr ""
 
msgid "MemberRole|Add new role"
msgstr ""
msgid "MemberRole|Are you sure you want to delete this role?"
msgstr ""
 
......@@ -30968,7 +30965,7 @@ msgstr ""
msgid "MemberRole|Create custom roles"
msgstr ""
 
msgid "MemberRole|Create new role"
msgid "MemberRole|Create role"
msgstr ""
 
msgid "MemberRole|Custom permissions"
......@@ -31022,6 +31019,9 @@ msgstr ""
msgid "MemberRole|Name"
msgstr ""
 
msgid "MemberRole|New role"
msgstr ""
msgid "MemberRole|No custom roles found"
msgstr ""
 
......@@ -31046,7 +31046,7 @@ msgstr ""
msgid "MemberRole|Standard roles"
msgstr ""
 
msgid "MemberRole|To add a new role select 'Add new role'."
msgid "MemberRole|To create a role select 'New role'."
msgstr ""
 
msgid "MemberRole|To delete custom role, remove role from all group members."
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册