Commit bab23d2b authored by Evan Read's avatar Evan Read

Standardize on roles term in UI

Update UI and documentation with standard

Changelog: other
parent 608b95c8
......@@ -254,11 +254,11 @@ export default {
),
},
},
accessLevel: s__('InviteMembersModal|Choose a role permission'),
accessLevel: s__('InviteMembersModal|Select a role'),
accessExpireDate: s__('InviteMembersModal|Access expiration date (optional)'),
toastMessageSuccessful: s__('InviteMembersModal|Members were successfully added'),
toastMessageUnsuccessful: s__('InviteMembersModal|Some of the members could not be added'),
readMoreText: s__(`InviteMembersModal|%{linkStart}Read more%{linkEnd} about role permissions`),
readMoreText: s__(`InviteMembersModal|%{linkStart}Learn more%{linkEnd} about roles.`),
inviteButtonText: s__('InviteMembersModal|Invite'),
cancelButtonText: s__('InviteMembersModal|Cancel'),
headerCloseLabel: s__('InviteMembersModal|Close invite team members'),
......
......@@ -78,7 +78,7 @@ export default {
ref="glDropdown"
:right="!isDesktop"
:text="member.accessLevel.stringValue"
:header-text="__('Change permissions')"
:header-text="__('Change role')"
:disabled="disabled"
>
<gl-dropdown-item
......
# frozen_string_literal: true
module Preloaders
# This class preloads the max access level for the user within the given projects and
# This class preloads the max access level (role) for the user within the given projects and
# stores the values in requests store via the ProjectTeam class.
class UserMaxAccessLevelInProjectsPreloader
def initialize(projects, user)
......
......@@ -49,7 +49,7 @@ module AuthorizedProjectUpdate
def access_level(membership_access_level)
return membership_access_level unless group_access
# access level must not be higher than the max access level set when
# access level (role) must not be higher than the max access level (role) set when
# creating the project share
[membership_access_level, group_access].min
end
......
......@@ -29,7 +29,7 @@
= group_link.human_access
= sprite_icon("chevron-down", css_class: "dropdown-menu-toggle-icon gl-top-3")
.dropdown-menu.dropdown-select.dropdown-menu-right.dropdown-menu-selectable
= dropdown_title(_("Change permissions"))
= dropdown_title(_("Change role"))
.dropdown-content
%ul
- Gitlab::Access.options_with_owner.each do |role, role_id|
......
......@@ -14,14 +14,14 @@
.form-text.text-muted.gl-mb-3
= _('Group sharing provides access to all group members (including members who inherited group membership from a parent group).')
.form-group
= label_tag group_access_field, _("Max access level"), class: "label-bold"
= label_tag group_access_field, _("Max role"), class: "label-bold"
.select-wrapper
= select_tag group_access_field, options_for_select(access_levels, default_access_level), data: { qa_selector: 'group_access_field' }, class: "form-control select-control"
= sprite_icon('chevron-down', css_class: "gl-icon gl-absolute gl-top-3 gl-right-3 gl-text-gray-200")
.form-text.text-muted.gl-mb-3
- permissions_docs_path = help_page_path('user/permissions')
- link_start = %q{<a href="%{url}">}.html_safe % { url: permissions_docs_path }
= _("%{link_start}Read more%{link_end} about role permissions").html_safe % { link_start: link_start, link_end: '</a>'.html_safe }
= _("%{link_start}Learn more%{link_end} about roles.").html_safe % { link_start: link_start, link_end: '</a>'.html_safe }
.form-group
= label_tag :expires_at, _('Access expiration date'), class: 'label-bold'
.clearable-input
......
......@@ -10,14 +10,14 @@
= label_tag :user_ids, _("GitLab member or Email address"), class: "label-bold"
= users_select_tag(:user_ids, multiple: true, class: 'input-clamp qa-member-select-field', scope: :all, email_user: true, placeholder: 'Search for members to update or invite')
.form-group
= label_tag :access_level, _("Choose a role permission"), class: "label-bold"
= label_tag :access_level, _("Select a role"), class: "label-bold"
.select-wrapper
= select_tag :access_level, options_for_select(access_levels, default_access_level), class: "form-control project-access-select select-control"
= sprite_icon('chevron-down', css_class: "gl-icon gl-absolute gl-top-3 gl-right-3 gl-text-gray-200")
.form-text.text-muted.gl-mb-3
- permissions_docs_path = help_page_path('user/permissions')
- link_start = %q{<a href="%{url}">}.html_safe % { url: permissions_docs_path }
= _("%{link_start}Read more%{link_end} about role permissions").html_safe % { link_start: link_start, link_end: '</a>'.html_safe }
= _("%{link_start}Learn more%{link_end} about roles.").html_safe % { link_start: link_start, link_end: '</a>'.html_safe }
.form-group
= label_tag :expires_at, _('Access expiration date'), class: 'label-bold'
.clearable-input
......
......@@ -81,7 +81,7 @@
= member.human_access
= sprite_icon("chevron-down", css_class: "dropdown-menu-toggle-icon gl-top-3")
.dropdown-menu.dropdown-select.dropdown-menu-right.dropdown-menu-selectable
= dropdown_title(_("Change permissions"))
= dropdown_title(_("Change role"))
.dropdown-content
%ul
- member.valid_level_roles.each do |role, role_id|
......
......@@ -271,7 +271,7 @@ To share a given group, for example, `Frontend` with another group, for example,
1. From the left menu, select **Members**.
1. Select the **Invite group** tab.
1. In the **Select a group to invite** list, select `Engineering`.
1. For the **Max access level**, select an access level.
1. For the **Max role**, select a [role](../permissions.md).
1. Select **Invite**.
All the members of the `Engineering` group are added to the `Frontend` group.
......@@ -293,7 +293,7 @@ To share a group after enabling this feature:
1. Go to your group's page.
1. In the left sidebar, go to **Members**, and then select **Invite a group**.
1. Select a group, and select a **Max access level**.
1. Select a group, and select a **Max role**.
1. (Optional) Select an **Access expiration date**.
1. Select **Invite**.
......
......@@ -60,7 +60,7 @@ To share a project after enabling this feature:
1. Go to your project's page.
1. In the left sidebar, go to **Members**, and then select **Invite a group**.
1. Select a group, and select a **Max access level**.
1. Select a group, and select a **Max role**.
1. (Optional) Select an **Access expiration date**.
1. Select **Invite**.
......
......@@ -654,10 +654,10 @@ msgstr ""
msgid "%{level_name} is not allowed since the fork source project has lower visibility."
msgstr ""
msgid "%{link_start}Learn more%{link_end} about what information is shared with GitLab Inc."
msgid "%{link_start}Learn more%{link_end} about roles."
msgstr ""
msgid "%{link_start}Read more%{link_end} about role permissions"
msgid "%{link_start}Learn more%{link_end} about what information is shared with GitLab Inc."
msgstr ""
msgid "%{link_start}Remove the %{draft_snippet} prefix%{link_end} from the title to allow this merge request to be merged when it's ready."
......@@ -6040,15 +6040,15 @@ msgstr ""
msgid "Change path"
msgstr ""
msgid "Change permissions"
msgstr ""
msgid "Change reviewer(s)"
msgstr ""
msgid "Change reviewer(s)."
msgstr ""
msgid "Change role"
msgstr ""
msgid "Change status"
msgstr ""
......@@ -6427,9 +6427,6 @@ msgstr ""
msgid "Choose a group"
msgstr ""
msgid "Choose a role permission"
msgstr ""
msgid "Choose a template"
msgstr ""
......@@ -17941,7 +17938,7 @@ msgstr ""
msgid "InviteMembersBanner|We noticed that you haven't invited anyone to this group. Invite your colleagues so you can discuss issues, collaborate on merge requests, and share your knowledge."
msgstr ""
msgid "InviteMembersModal|%{linkStart}Read more%{linkEnd} about role permissions"
msgid "InviteMembersModal|%{linkStart}Learn more%{linkEnd} about roles."
msgstr ""
msgid "InviteMembersModal|Access expiration date (optional)"
......@@ -17950,9 +17947,6 @@ msgstr ""
msgid "InviteMembersModal|Cancel"
msgstr ""
msgid "InviteMembersModal|Choose a role permission"
msgstr ""
msgid "InviteMembersModal|Close invite team members"
msgstr ""
......@@ -17977,6 +17971,9 @@ msgstr ""
msgid "InviteMembersModal|Select a group to invite"
msgstr ""
msgid "InviteMembersModal|Select a role"
msgstr ""
msgid "InviteMembersModal|Select members or type email addresses"
msgstr ""
......@@ -20153,9 +20150,6 @@ msgstr ""
msgid "Max Project Import requests per minute per user"
msgstr ""
msgid "Max access level"
msgstr ""
msgid "Max authenticated API requests per period per user"
msgstr ""
......@@ -29216,6 +29210,9 @@ msgstr ""
msgid "Select a repository"
msgstr ""
msgid "Select a role"
msgstr ""
msgid "Select a shared template repository for all projects on this instance."
msgstr ""
......
......@@ -88,7 +88,7 @@ describe('RoleDropdown', () => {
});
it('renders dropdown header', () => {
expect(getByTextInDropdownMenu('Change permissions').exists()).toBe(true);
expect(getByTextInDropdownMenu('Change role').exists()).toBe(true);
});
it('sets dropdown toggle and checks selected role', () => {
......
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