Commit fe964d08 authored by Paul Slaughter's avatar Paul Slaughter

Merge branch 'eread/standardize-roles-term-in-ui' into 'master'

Standardize on roles term in UI

See merge request gitlab-org/gitlab!63274
parents 0ba651e5 bab23d2b
...@@ -254,11 +254,11 @@ export default { ...@@ -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)'), accessExpireDate: s__('InviteMembersModal|Access expiration date (optional)'),
toastMessageSuccessful: s__('InviteMembersModal|Members were successfully added'), toastMessageSuccessful: s__('InviteMembersModal|Members were successfully added'),
toastMessageUnsuccessful: s__('InviteMembersModal|Some of the members could not be 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'), inviteButtonText: s__('InviteMembersModal|Invite'),
cancelButtonText: s__('InviteMembersModal|Cancel'), cancelButtonText: s__('InviteMembersModal|Cancel'),
headerCloseLabel: s__('InviteMembersModal|Close invite team members'), headerCloseLabel: s__('InviteMembersModal|Close invite team members'),
......
...@@ -78,7 +78,7 @@ export default { ...@@ -78,7 +78,7 @@ export default {
ref="glDropdown" ref="glDropdown"
:right="!isDesktop" :right="!isDesktop"
:text="member.accessLevel.stringValue" :text="member.accessLevel.stringValue"
:header-text="__('Change permissions')" :header-text="__('Change role')"
:disabled="disabled" :disabled="disabled"
> >
<gl-dropdown-item <gl-dropdown-item
......
# frozen_string_literal: true # frozen_string_literal: true
module Preloaders 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. # stores the values in requests store via the ProjectTeam class.
class UserMaxAccessLevelInProjectsPreloader class UserMaxAccessLevelInProjectsPreloader
def initialize(projects, user) def initialize(projects, user)
......
...@@ -49,7 +49,7 @@ module AuthorizedProjectUpdate ...@@ -49,7 +49,7 @@ module AuthorizedProjectUpdate
def access_level(membership_access_level) def access_level(membership_access_level)
return membership_access_level unless group_access 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 # creating the project share
[membership_access_level, group_access].min [membership_access_level, group_access].min
end end
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
= group_link.human_access = group_link.human_access
= sprite_icon("chevron-down", css_class: "dropdown-menu-toggle-icon gl-top-3") = sprite_icon("chevron-down", css_class: "dropdown-menu-toggle-icon gl-top-3")
.dropdown-menu.dropdown-select.dropdown-menu-right.dropdown-menu-selectable .dropdown-menu.dropdown-select.dropdown-menu-right.dropdown-menu-selectable
= dropdown_title(_("Change permissions")) = dropdown_title(_("Change role"))
.dropdown-content .dropdown-content
%ul %ul
- Gitlab::Access.options_with_owner.each do |role, role_id| - Gitlab::Access.options_with_owner.each do |role, role_id|
......
...@@ -14,14 +14,14 @@ ...@@ -14,14 +14,14 @@
.form-text.text-muted.gl-mb-3 .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).') = _('Group sharing provides access to all group members (including members who inherited group membership from a parent group).')
.form-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-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" = 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") = 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 .form-text.text-muted.gl-mb-3
- permissions_docs_path = help_page_path('user/permissions') - permissions_docs_path = help_page_path('user/permissions')
- link_start = %q{<a href="%{url}">}.html_safe % { url: permissions_docs_path } - 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 .form-group
= label_tag :expires_at, _('Access expiration date'), class: 'label-bold' = label_tag :expires_at, _('Access expiration date'), class: 'label-bold'
.clearable-input .clearable-input
......
...@@ -10,14 +10,14 @@ ...@@ -10,14 +10,14 @@
= label_tag :user_ids, _("GitLab member or Email address"), class: "label-bold" = 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') = 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 .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-wrapper
= select_tag :access_level, options_for_select(access_levels, default_access_level), class: "form-control project-access-select select-control" = 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") = 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 .form-text.text-muted.gl-mb-3
- permissions_docs_path = help_page_path('user/permissions') - permissions_docs_path = help_page_path('user/permissions')
- link_start = %q{<a href="%{url}">}.html_safe % { url: permissions_docs_path } - 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 .form-group
= label_tag :expires_at, _('Access expiration date'), class: 'label-bold' = label_tag :expires_at, _('Access expiration date'), class: 'label-bold'
.clearable-input .clearable-input
......
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
= member.human_access = member.human_access
= sprite_icon("chevron-down", css_class: "dropdown-menu-toggle-icon gl-top-3") = sprite_icon("chevron-down", css_class: "dropdown-menu-toggle-icon gl-top-3")
.dropdown-menu.dropdown-select.dropdown-menu-right.dropdown-menu-selectable .dropdown-menu.dropdown-select.dropdown-menu-right.dropdown-menu-selectable
= dropdown_title(_("Change permissions")) = dropdown_title(_("Change role"))
.dropdown-content .dropdown-content
%ul %ul
- member.valid_level_roles.each do |role, role_id| - member.valid_level_roles.each do |role, role_id|
......
...@@ -276,7 +276,7 @@ To share a given group, for example, `Frontend` with another group, for example, ...@@ -276,7 +276,7 @@ To share a given group, for example, `Frontend` with another group, for example,
1. From the left menu, select **Members**. 1. From the left menu, select **Members**.
1. Select the **Invite group** tab. 1. Select the **Invite group** tab.
1. In the **Select a group to invite** list, select `Engineering`. 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**. 1. Select **Invite**.
All the members of the `Engineering` group are added to the `Frontend` group. All the members of the `Engineering` group are added to the `Frontend` group.
...@@ -298,7 +298,7 @@ To share a group after enabling this feature: ...@@ -298,7 +298,7 @@ To share a group after enabling this feature:
1. Go to your group's page. 1. Go to your group's page.
1. In the left sidebar, go to **Members**, and then select **Invite a group**. 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. (Optional) Select an **Access expiration date**.
1. Select **Invite**. 1. Select **Invite**.
......
...@@ -60,7 +60,7 @@ To share a project after enabling this feature: ...@@ -60,7 +60,7 @@ To share a project after enabling this feature:
1. Go to your project's page. 1. Go to your project's page.
1. In the left sidebar, go to **Members**, and then select **Invite a group**. 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. (Optional) Select an **Access expiration date**.
1. Select **Invite**. 1. Select **Invite**.
......
...@@ -654,10 +654,10 @@ msgstr "" ...@@ -654,10 +654,10 @@ msgstr ""
msgid "%{level_name} is not allowed since the fork source project has lower visibility." msgid "%{level_name} is not allowed since the fork source project has lower visibility."
msgstr "" 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 "" 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 "" 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." 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."
...@@ -6043,15 +6043,15 @@ msgstr "" ...@@ -6043,15 +6043,15 @@ msgstr ""
msgid "Change path" msgid "Change path"
msgstr "" msgstr ""
msgid "Change permissions"
msgstr ""
msgid "Change reviewer(s)" msgid "Change reviewer(s)"
msgstr "" msgstr ""
msgid "Change reviewer(s)." msgid "Change reviewer(s)."
msgstr "" msgstr ""
msgid "Change role"
msgstr ""
msgid "Change status" msgid "Change status"
msgstr "" msgstr ""
...@@ -6430,9 +6430,6 @@ msgstr "" ...@@ -6430,9 +6430,6 @@ msgstr ""
msgid "Choose a group" msgid "Choose a group"
msgstr "" msgstr ""
msgid "Choose a role permission"
msgstr ""
msgid "Choose a template" msgid "Choose a template"
msgstr "" msgstr ""
...@@ -17938,7 +17935,7 @@ msgstr "" ...@@ -17938,7 +17935,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." 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 "" msgstr ""
msgid "InviteMembersModal|%{linkStart}Read more%{linkEnd} about role permissions" msgid "InviteMembersModal|%{linkStart}Learn more%{linkEnd} about roles."
msgstr "" msgstr ""
msgid "InviteMembersModal|Access expiration date (optional)" msgid "InviteMembersModal|Access expiration date (optional)"
...@@ -17947,9 +17944,6 @@ msgstr "" ...@@ -17947,9 +17944,6 @@ msgstr ""
msgid "InviteMembersModal|Cancel" msgid "InviteMembersModal|Cancel"
msgstr "" msgstr ""
msgid "InviteMembersModal|Choose a role permission"
msgstr ""
msgid "InviteMembersModal|Close invite team members" msgid "InviteMembersModal|Close invite team members"
msgstr "" msgstr ""
...@@ -17974,6 +17968,9 @@ msgstr "" ...@@ -17974,6 +17968,9 @@ msgstr ""
msgid "InviteMembersModal|Select a group to invite" msgid "InviteMembersModal|Select a group to invite"
msgstr "" msgstr ""
msgid "InviteMembersModal|Select a role"
msgstr ""
msgid "InviteMembersModal|Select members or type email addresses" msgid "InviteMembersModal|Select members or type email addresses"
msgstr "" msgstr ""
...@@ -20138,9 +20135,6 @@ msgstr "" ...@@ -20138,9 +20135,6 @@ msgstr ""
msgid "Max Project Import requests per minute per user" msgid "Max Project Import requests per minute per user"
msgstr "" msgstr ""
msgid "Max access level"
msgstr ""
msgid "Max authenticated API requests per period per user" msgid "Max authenticated API requests per period per user"
msgstr "" msgstr ""
...@@ -29210,6 +29204,9 @@ msgstr "" ...@@ -29210,6 +29204,9 @@ msgstr ""
msgid "Select a repository" msgid "Select a repository"
msgstr "" msgstr ""
msgid "Select a role"
msgstr ""
msgid "Select a shared template repository for all projects on this instance." msgid "Select a shared template repository for all projects on this instance."
msgstr "" msgstr ""
......
...@@ -88,7 +88,7 @@ describe('RoleDropdown', () => { ...@@ -88,7 +88,7 @@ describe('RoleDropdown', () => {
}); });
it('renders dropdown header', () => { 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', () => { 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