diff --git a/doc/development/permissions/custom_roles.md b/doc/development/permissions/custom_roles.md index 9123e8c35dc6e8cd3517088af948858befaea5b4..9c8a8691c0b93ef4ad3f692872b008fdc74a90d8 100644 --- a/doc/development/permissions/custom_roles.md +++ b/doc/development/permissions/custom_roles.md @@ -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. diff --git a/doc/user/custom_roles.md b/doc/user/custom_roles.md index ef0dc7c4e45922f16469caa7e9547ddf1f12dd21..cd4231c32d666b1c432f1397fccda6b356153d86 100644 --- a/doc/user/custom_roles.md +++ b/doc/user/custom_roles.md @@ -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: diff --git a/ee/app/assets/javascripts/roles_and_permissions/components/app.vue b/ee/app/assets/javascripts/roles_and_permissions/components/app.vue index 731ea3da5582526f7555bef9989fcc271bc6a8f0..5eac44a3a6ef4d66619b996b4957229a69c38205 100644 --- a/ee/app/assets/javascripts/roles_and_permissions/components/app.vue +++ b/ee/app/assets/javascripts/roles_and_permissions/components/app.vue @@ -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> diff --git a/ee/app/assets/javascripts/roles_and_permissions/components/create_member_role.vue b/ee/app/assets/javascripts/roles_and_permissions/components/create_member_role.vue index c0699890af0462ce0a27125a60812f5f7152cf53..bfa46f54e771e84d773f06f4a8a5b275de69a9e6 100644 --- a/ee/app/assets/javascripts/roles_and_permissions/components/create_member_role.vue +++ b/ee/app/assets/javascripts/roles_and_permissions/components/create_member_role.vue @@ -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" diff --git a/ee/app/assets/javascripts/roles_and_permissions/components/custom_roles_empty_state.vue b/ee/app/assets/javascripts/roles_and_permissions/components/custom_roles_empty_state.vue index ce80a0f2d1547bfcb922c853fdba4ca3a958a793..35bacecd3a50c2ac782decd3dfb3ea722e224277 100644 --- a/ee/app/assets/javascripts/roles_and_permissions/components/custom_roles_empty_state.vue +++ b/ee/app/assets/javascripts/roles_and_permissions/components/custom_roles_empty_state.vue @@ -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"> diff --git a/ee/app/assets/javascripts/roles_and_permissions/components/list_member_roles.vue b/ee/app/assets/javascripts/roles_and_permissions/components/list_member_roles.vue index e6a2acc97df6a6b10fa2da01333d68b51cc017cf..abd33aa31ec69880fa17b73f9b9932e1e5310a9e 100644 --- a/ee/app/assets/javascripts/roles_and_permissions/components/list_member_roles.vue +++ b/ee/app/assets/javascripts/roles_and_permissions/components/list_member_roles.vue @@ -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> diff --git a/ee/spec/features/admin/member_roles_spec.rb b/ee/spec/features/admin/member_roles_spec.rb index a716d27f08623cc39bfe46813708452d93e7ccff..135e5429e2cb93a78a98ade08470041ace9065b4 100644 --- a/ee/spec/features/admin/member_roles_spec.rb +++ b/ee/spec/features/admin/member_roles_spec.rb @@ -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) diff --git a/ee/spec/features/groups/member_roles_spec.rb b/ee/spec/features/groups/member_roles_spec.rb index ec3a63c67dc6b6dbdb1c2604b9b6ecbbc89d10ba..d91b9053936cf7915d27391e8043da75e31bf785 100644 --- a/ee/spec/features/groups/member_roles_spec.rb +++ b/ee/spec/features/groups/member_roles_spec.rb @@ -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) diff --git a/ee/spec/frontend/roles_and_permissions/components/app_spec.js b/ee/spec/frontend/roles_and_permissions/components/app_spec.js index eddc15a1c50efd9b1201d70068c5623d92e47b4f..a817890a65777ef464e75b1b281687197457ef30 100644 --- a/ee/spec/frontend/roles_and_permissions/components/app_spec.js +++ b/ee/spec/frontend/roles_and_permissions/components/app_spec.js @@ -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', () => { diff --git a/ee/spec/frontend/roles_and_permissions/components/custom_roles_empty_state_spec.js b/ee/spec/frontend/roles_and_permissions/components/custom_roles_empty_state_spec.js index cd1ca857388dd499b7b616edb21a7f11b7c5f45d..be3106d5873ebcdb6c33bb777a29eb89e8718e03 100644 --- a/ee/spec/frontend/roles_and_permissions/components/custom_roles_empty_state_spec.js +++ b/ee/spec/frontend/roles_and_permissions/components/custom_roles_empty_state_spec.js @@ -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( diff --git a/locale/gitlab.pot b/locale/gitlab.pot index ed3896667c0ab531f4798a9c12c14dd0106487f4..3063ec2a52d5935d178c1e3d7ed1090f06745957 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -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."