diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-12 09:09:05 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-12 09:09:05 +0000 |
commit | dcb517514405d6f550cc077686889dbb34c37c75 (patch) | |
tree | 484a0dc16cbce6b5bb638d8a2e29131374ca1363 /app | |
parent | b684feb6c8dc322efb73d1e0473bcd3f37e08d34 (diff) | |
download | gitlab-ce-dcb517514405d6f550cc077686889dbb34c37c75.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
21 files changed, 256 insertions, 89 deletions
diff --git a/app/assets/javascripts/content_editor/extensions/emoji.js b/app/assets/javascripts/content_editor/extensions/emoji.js new file mode 100644 index 00000000000..d88b9f92215 --- /dev/null +++ b/app/assets/javascripts/content_editor/extensions/emoji.js @@ -0,0 +1,93 @@ +import { Node } from '@tiptap/core'; +import { InputRule } from 'prosemirror-inputrules'; +import { initEmojiMap, getAllEmoji } from '~/emoji'; + +export const emojiInputRegex = /(?:^|\s)((?::)((?:\w+))(?::))$/; + +export default Node.create({ + name: 'emoji', + + inline: true, + + group: 'inline', + + draggable: true, + + addAttributes() { + return { + moji: { + default: null, + parseHTML: (element) => { + return { + moji: element.textContent, + }; + }, + }, + name: { + default: null, + parseHTML: (element) => { + return { + name: element.dataset.name, + }; + }, + }, + title: { + default: null, + }, + unicodeVersion: { + default: '6.0', + parseHTML: (element) => { + return { + unicodeVersion: element.dataset.unicodeVersion, + }; + }, + }, + }; + }, + + parseHTML() { + return [ + { + tag: 'gl-emoji', + }, + ]; + }, + + renderHTML({ node }) { + return [ + 'gl-emoji', + { + 'data-name': node.attrs.name, + title: node.attrs.title, + 'data-unicode-version': node.attrs.unicodeVersion, + }, + node.attrs.moji, + ]; + }, + + addInputRules() { + return [ + new InputRule(emojiInputRegex, (state, match, start, end) => { + const [, , name] = match; + const emojis = getAllEmoji(); + const emoji = emojis[name]; + const { tr } = state; + + if (emoji) { + tr.replaceWith(start, end, [ + state.schema.text(' '), + this.type.create({ name, moji: emoji.e, unicodeVersion: emoji.u, title: emoji.d }), + ]); + + return tr; + } + + return null; + }), + ]; + }, + + onCreate() { + initEmojiMap(); + }, +}); diff --git a/app/assets/javascripts/content_editor/services/create_content_editor.js b/app/assets/javascripts/content_editor/services/create_content_editor.js index 8f2ed3fcacd..eb6317bd988 100644 --- a/app/assets/javascripts/content_editor/services/create_content_editor.js +++ b/app/assets/javascripts/content_editor/services/create_content_editor.js @@ -9,6 +9,7 @@ import Code from '../extensions/code'; import CodeBlockHighlight from '../extensions/code_block_highlight'; import Document from '../extensions/document'; import Dropcursor from '../extensions/dropcursor'; +import Emoji from '../extensions/emoji'; import Gapcursor from '../extensions/gapcursor'; import HardBreak from '../extensions/hard_break'; import Heading from '../extensions/heading'; @@ -62,6 +63,7 @@ export const createContentEditor = ({ CodeBlockHighlight, Document, Dropcursor, + Emoji, Gapcursor, HardBreak, Heading, diff --git a/app/assets/javascripts/content_editor/services/markdown_serializer.js b/app/assets/javascripts/content_editor/services/markdown_serializer.js index 8b635e168ed..702344f5514 100644 --- a/app/assets/javascripts/content_editor/services/markdown_serializer.js +++ b/app/assets/javascripts/content_editor/services/markdown_serializer.js @@ -8,6 +8,7 @@ import Bold from '../extensions/bold'; import BulletList from '../extensions/bullet_list'; import Code from '../extensions/code'; import CodeBlockHighlight from '../extensions/code_block_highlight'; +import Emoji from '../extensions/emoji'; import HardBreak from '../extensions/hard_break'; import Heading from '../extensions/heading'; import HorizontalRule from '../extensions/horizontal_rule'; @@ -51,6 +52,11 @@ const defaultSerializerConfig = { [Blockquote.name]: defaultMarkdownSerializer.nodes.blockquote, [BulletList.name]: defaultMarkdownSerializer.nodes.bullet_list, [CodeBlockHighlight.name]: defaultMarkdownSerializer.nodes.code_block, + [Emoji.name]: (state, node) => { + const { name } = node.attrs; + + state.write(`:${name}:`); + }, [HardBreak.name]: defaultMarkdownSerializer.nodes.hard_break, [Heading.name]: defaultMarkdownSerializer.nodes.heading, [HorizontalRule.name]: defaultMarkdownSerializer.nodes.horizontal_rule, diff --git a/app/assets/javascripts/import_entities/import_groups/components/import_table.vue b/app/assets/javascripts/import_entities/import_groups/components/import_table.vue index e9559f735d6..bcacf9a3bbc 100644 --- a/app/assets/javascripts/import_entities/import_groups/components/import_table.vue +++ b/app/assets/javascripts/import_entities/import_groups/components/import_table.vue @@ -16,8 +16,7 @@ import { s__, __, n__ } from '~/locale'; import PaginationLinks from '~/vue_shared/components/pagination_links.vue'; import { STATUSES } from '../../constants'; import importGroupsMutation from '../graphql/mutations/import_groups.mutation.graphql'; -import setNewNameMutation from '../graphql/mutations/set_new_name.mutation.graphql'; -import setTargetNamespaceMutation from '../graphql/mutations/set_target_namespace.mutation.graphql'; +import setImportTargetMutation from '../graphql/mutations/set_import_target.mutation.graphql'; import availableNamespacesQuery from '../graphql/queries/available_namespaces.query.graphql'; import bulkImportSourceGroupsQuery from '../graphql/queries/bulk_import_source_groups.query.graphql'; import ImportTableRow from './import_table_row.vue'; @@ -142,17 +141,10 @@ export default { this.page = page; }, - updateTargetNamespace(sourceGroupId, targetNamespace) { + updateImportTarget(sourceGroupId, targetNamespace, newName) { this.$apollo.mutate({ - mutation: setTargetNamespaceMutation, - variables: { sourceGroupId, targetNamespace }, - }); - }, - - updateNewName(sourceGroupId, newName) { - this.$apollo.mutate({ - mutation: setNewNameMutation, - variables: { sourceGroupId, newName }, + mutation: setImportTargetMutation, + variables: { sourceGroupId, targetNamespace, newName }, }); }, @@ -266,8 +258,12 @@ export default { :available-namespaces="availableNamespaces" :group-path-regex="groupPathRegex" :group-url-error-message="groupUrlErrorMessage" - @update-target-namespace="updateTargetNamespace(group.id, $event)" - @update-new-name="updateNewName(group.id, $event)" + @update-target-namespace=" + updateImportTarget(group.id, $event, group.import_target.new_name) + " + @update-new-name=" + updateImportTarget(group.id, group.import_target.target_namespace, $event) + " @import-group="importGroups([group.id])" /> </template> diff --git a/app/assets/javascripts/import_entities/import_groups/components/import_table_row.vue b/app/assets/javascripts/import_entities/import_groups/components/import_table_row.vue index 96c1dd21821..3dd780895a2 100644 --- a/app/assets/javascripts/import_entities/import_groups/components/import_table_row.vue +++ b/app/assets/javascripts/import_entities/import_groups/components/import_table_row.vue @@ -9,15 +9,9 @@ import { GlFormInput, } from '@gitlab/ui'; import { joinPaths } from '~/lib/utils/url_utility'; -import { s__ } from '~/locale'; import ImportGroupDropdown from '../../components/group_dropdown.vue'; import ImportStatus from '../../components/import_status.vue'; import { STATUSES } from '../../constants'; -import addValidationErrorMutation from '../graphql/mutations/add_validation_error.mutation.graphql'; -import removeValidationErrorMutation from '../graphql/mutations/remove_validation_error.mutation.graphql'; -import groupAndProjectQuery from '../graphql/queries/groupAndProject.query.graphql'; - -const DEBOUNCE_INTERVAL = 300; export default { components: { @@ -50,42 +44,6 @@ export default { }, }, - apollo: { - existingGroupAndProject: { - query: groupAndProjectQuery, - debounce: DEBOUNCE_INTERVAL, - variables() { - return { - fullPath: this.fullPath, - }; - }, - update({ existingGroup, existingProject }) { - const variables = { - field: 'new_name', - sourceGroupId: this.group.id, - }; - - if (!existingGroup && !existingProject) { - this.$apollo.mutate({ - mutation: removeValidationErrorMutation, - variables, - }); - } else { - this.$apollo.mutate({ - mutation: addValidationErrorMutation, - variables: { - ...variables, - message: this.$options.i18n.NAME_ALREADY_EXISTS, - }, - }); - } - }, - skip() { - return !this.isNameValid || this.isAlreadyImported; - }, - }, - }, - computed: { availableNamespaceNames() { return this.availableNamespaces.map((ns) => ns.full_path); @@ -123,10 +81,6 @@ export default { return joinPaths(gon.relative_url_root || '/', this.fullPath); }, }, - - i18n: { - NAME_ALREADY_EXISTS: s__('BulkImport|Name already exists.'), - }, }; </script> diff --git a/app/assets/javascripts/import_entities/import_groups/constants.js b/app/assets/javascripts/import_entities/import_groups/constants.js new file mode 100644 index 00000000000..d920e87aac8 --- /dev/null +++ b/app/assets/javascripts/import_entities/import_groups/constants.js @@ -0,0 +1,5 @@ +import { s__ } from '~/locale'; + +export const i18n = { + NAME_ALREADY_EXISTS: s__('BulkImport|Name already exists.'), +}; diff --git a/app/assets/javascripts/import_entities/import_groups/graphql/client_factory.js b/app/assets/javascripts/import_entities/import_groups/graphql/client_factory.js index 2cde3781a6a..c608aa164d1 100644 --- a/app/assets/javascripts/import_entities/import_groups/graphql/client_factory.js +++ b/app/assets/javascripts/import_entities/import_groups/graphql/client_factory.js @@ -4,11 +4,15 @@ import axios from '~/lib/utils/axios_utils'; import { parseIntPagination, normalizeHeaders } from '~/lib/utils/common_utils'; import { s__ } from '~/locale'; import { STATUSES } from '../../constants'; +import { i18n } from '../constants'; import bulkImportSourceGroupItemFragment from './fragments/bulk_import_source_group_item.fragment.graphql'; +import addValidationErrorMutation from './mutations/add_validation_error.mutation.graphql'; +import removeValidationErrorMutation from './mutations/remove_validation_error.mutation.graphql'; import setImportProgressMutation from './mutations/set_import_progress.mutation.graphql'; import updateImportStatusMutation from './mutations/update_import_status.mutation.graphql'; import availableNamespacesQuery from './queries/available_namespaces.query.graphql'; import bulkImportSourceGroupQuery from './queries/bulk_import_source_group.query.graphql'; +import groupAndProjectQuery from './queries/group_and_project.query.graphql'; import { SourceGroupsManager } from './services/source_groups_manager'; import { StatusPoller } from './services/status_poller'; import typeDefs from './typedefs.graphql'; @@ -46,6 +50,37 @@ function makeGroup(data) { return result; } +async function checkImportTargetIsValid({ client, newName, targetNamespace, sourceGroupId }) { + const { + data: { existingGroup, existingProject }, + } = await client.query({ + query: groupAndProjectQuery, + variables: { + fullPath: `${targetNamespace}/${newName}`, + }, + }); + + const variables = { + field: 'new_name', + sourceGroupId, + }; + + if (!existingGroup && !existingProject) { + client.mutate({ + mutation: removeValidationErrorMutation, + variables, + }); + } else { + client.mutate({ + mutation: addValidationErrorMutation, + variables: { + ...variables, + message: i18n.NAME_ALREADY_EXISTS, + }, + }); + } +} + const localProgressId = (id) => `not-started-${id}`; export function createResolvers({ endpoints, sourceUrl, GroupsManager = SourceGroupsManager }) { @@ -99,7 +134,7 @@ export function createResolvers({ endpoints, sourceUrl, GroupsManager = SourceGr ]) => { const pagination = parseIntPagination(normalizeHeaders(headers)); - return { + const response = { __typename: clientTypenames.BulkImportSourceGroupConnection, nodes: data.importable_data.map((group) => { const { jobId, importState: cachedImportState } = @@ -123,6 +158,21 @@ export function createResolvers({ endpoints, sourceUrl, GroupsManager = SourceGr ...pagination, }, }; + + setTimeout(() => { + response.nodes.forEach((group) => { + if (group.progress.status === STATUSES.NONE) { + checkImportTargetIsValid({ + client, + newName: group.import_target.new_name, + targetNamespace: group.import_target.target_namespace, + sourceGroupId: group.id, + }); + } + }); + }); + + return response; }, ); }, @@ -136,6 +186,22 @@ export function createResolvers({ endpoints, sourceUrl, GroupsManager = SourceGr ), }, Mutation: { + setImportTarget(_, { targetNamespace, newName, sourceGroupId }, { client }) { + checkImportTargetIsValid({ + client, + sourceGroupId, + targetNamespace, + newName, + }); + return makeGroup({ + id: sourceGroupId, + import_target: { + target_namespace: targetNamespace, + new_name: newName, + }, + }); + }, + setTargetNamespace: (_, { targetNamespace, sourceGroupId }) => makeGroup({ id: sourceGroupId, diff --git a/app/assets/javascripts/import_entities/import_groups/graphql/mutations/set_import_target.mutation.graphql b/app/assets/javascripts/import_entities/import_groups/graphql/mutations/set_import_target.mutation.graphql new file mode 100644 index 00000000000..793b60ee378 --- /dev/null +++ b/app/assets/javascripts/import_entities/import_groups/graphql/mutations/set_import_target.mutation.graphql @@ -0,0 +1,13 @@ +mutation setImportTarget($newName: String!, $targetNamespace: String!, $sourceGroupId: String!) { + setImportTarget( + newName: $newName + targetNamespace: $targetNamespace + sourceGroupId: $sourceGroupId + ) @client { + id + import_target { + new_name + target_namespace + } + } +} diff --git a/app/assets/javascripts/import_entities/import_groups/graphql/mutations/set_new_name.mutation.graphql b/app/assets/javascripts/import_entities/import_groups/graphql/mutations/set_new_name.mutation.graphql deleted file mode 100644 index 354bf2a5815..00000000000 --- a/app/assets/javascripts/import_entities/import_groups/graphql/mutations/set_new_name.mutation.graphql +++ /dev/null @@ -1,8 +0,0 @@ -mutation setNewName($newName: String!, $sourceGroupId: String!) { - setNewName(newName: $newName, sourceGroupId: $sourceGroupId) @client { - id - import_target { - new_name - } - } -} diff --git a/app/assets/javascripts/import_entities/import_groups/graphql/mutations/set_target_namespace.mutation.graphql b/app/assets/javascripts/import_entities/import_groups/graphql/mutations/set_target_namespace.mutation.graphql deleted file mode 100644 index a0ef407f135..00000000000 --- a/app/assets/javascripts/import_entities/import_groups/graphql/mutations/set_target_namespace.mutation.graphql +++ /dev/null @@ -1,8 +0,0 @@ -mutation setTargetNamespace($targetNamespace: String!, $sourceGroupId: String!) { - setTargetNamespace(targetNamespace: $targetNamespace, sourceGroupId: $sourceGroupId) @client { - id - import_target { - target_namespace - } - } -} diff --git a/app/assets/javascripts/import_entities/import_groups/graphql/queries/groupAndProject.query.graphql b/app/assets/javascripts/import_entities/import_groups/graphql/queries/group_and_project.query.graphql index d6124f84025..d6124f84025 100644 --- a/app/assets/javascripts/import_entities/import_groups/graphql/queries/groupAndProject.query.graphql +++ b/app/assets/javascripts/import_entities/import_groups/graphql/queries/group_and_project.query.graphql diff --git a/app/assets/javascripts/invite_members/components/invite_members_modal.vue b/app/assets/javascripts/invite_members/components/invite_members_modal.vue index 40eccefd7e0..ab42e8cdfeb 100644 --- a/app/assets/javascripts/invite_members/components/invite_members_modal.vue +++ b/app/assets/javascripts/invite_members/components/invite_members_modal.vue @@ -16,7 +16,12 @@ import Api from '~/api'; import ExperimentTracking from '~/experimentation/experiment_tracking'; import { BV_SHOW_MODAL } from '~/lib/utils/constants'; import { s__, sprintf } from '~/locale'; -import { INVITE_MEMBERS_IN_COMMENT, GROUP_FILTERS, MEMBER_AREAS_OF_FOCUS } from '../constants'; +import { + INVITE_MEMBERS_IN_COMMENT, + GROUP_FILTERS, + USERS_FILTER_ALL, + MEMBER_AREAS_OF_FOCUS, +} from '../constants'; import eventHub from '../event_hub'; import { responseMessageFromError, @@ -72,6 +77,16 @@ export default { required: false, default: null, }, + usersFilter: { + type: String, + required: false, + default: USERS_FILTER_ALL, + }, + filterId: { + type: Number, + required: false, + default: null, + }, helpLink: { type: String, required: true, @@ -384,6 +399,8 @@ export default { class="gl-mb-2" :validation-state="validationState" :aria-labelledby="$options.membersTokenSelectLabelId" + :users-filter="usersFilter" + :filter-id="filterId" @clear="handleMembersTokenSelectClear" /> <group-select diff --git a/app/assets/javascripts/invite_members/components/members_token_select.vue b/app/assets/javascripts/invite_members/components/members_token_select.vue index 7aece3b7bb4..e299e3f27b3 100644 --- a/app/assets/javascripts/invite_members/components/members_token_select.vue +++ b/app/assets/javascripts/invite_members/components/members_token_select.vue @@ -3,7 +3,7 @@ import { GlTokenSelector, GlAvatar, GlAvatarLabeled, GlIcon, GlSprintf } from '@ import { debounce } from 'lodash'; import { __ } from '~/locale'; import { getUsers } from '~/rest_api'; -import { SEARCH_DELAY } from '../constants'; +import { SEARCH_DELAY, USERS_FILTER_ALL, USERS_FILTER_SAML_PROVIDER_ID } from '../constants'; export default { components: { @@ -26,6 +26,16 @@ export default { validationState: { type: Boolean, required: false, + default: false, + }, + usersFilter: { + type: String, + required: false, + default: USERS_FILTER_ALL, + }, + filterId: { + type: Number, + required: false, default: null, }, }, @@ -51,6 +61,15 @@ export default { } return ''; }, + queryOptions() { + if (this.usersFilter === USERS_FILTER_SAML_PROVIDER_ID) { + return { + saml_provider_id: this.filterId, + ...this.$options.defaultQueryOptions, + }; + } + return this.$options.defaultQueryOptions; + }, }, methods: { handleTextInput(query) { @@ -60,7 +79,7 @@ export default { this.retrieveUsers(query); }, retrieveUsers: debounce(function debouncedRetrieveUsers() { - return getUsers(this.query, this.$options.queryOptions) + return getUsers(this.query, this.queryOptions) .then((response) => { this.users = response.data.map((token) => ({ id: token.id, @@ -98,7 +117,7 @@ export default { this.$emit('clear'); }, }, - queryOptions: { exclude_internal: true, active: true }, + defaultQueryOptions: { exclude_internal: true, active: true }, i18n: { inviteTextMessage: __('Invite "%{email}" by email'), }, diff --git a/app/assets/javascripts/invite_members/constants.js b/app/assets/javascripts/invite_members/constants.js index 01b35f2a656..d7daf83e26b 100644 --- a/app/assets/javascripts/invite_members/constants.js +++ b/app/assets/javascripts/invite_members/constants.js @@ -17,3 +17,5 @@ export const GROUP_FILTERS = { export const API_MESSAGES = { EMAIL_ALREADY_INVITED: __('Invite email has already been taken'), }; +export const USERS_FILTER_ALL = 'all'; +export const USERS_FILTER_SAML_PROVIDER_ID = 'saml_provider_id'; diff --git a/app/assets/javascripts/invite_members/init_invite_members_modal.js b/app/assets/javascripts/invite_members/init_invite_members_modal.js index db7e2ca4a71..c1dfaa25dc7 100644 --- a/app/assets/javascripts/invite_members/init_invite_members_modal.js +++ b/app/assets/javascripts/invite_members/init_invite_members_modal.js @@ -25,6 +25,8 @@ export default function initInviteMembersModal() { groupSelectParentId: parseInt(el.dataset.parentId, 10), areasOfFocusOptions: JSON.parse(el.dataset.areasOfFocusOptions), noSelectionAreasOfFocus: JSON.parse(el.dataset.noSelectionAreasOfFocus), + usersFilter: el.dataset.usersFilter, + filterId: parseInt(el.dataset.filterId, 10), }, }), }); diff --git a/app/assets/javascripts/repository/components/delete_blob_modal.vue b/app/assets/javascripts/repository/components/delete_blob_modal.vue index c13bde6b41a..a307b7c0b8a 100644 --- a/app/assets/javascripts/repository/components/delete_blob_modal.vue +++ b/app/assets/javascripts/repository/components/delete_blob_modal.vue @@ -8,6 +8,8 @@ import { COMMIT_LABEL, TARGET_BRANCH_LABEL, TOGGLE_CREATE_MR_LABEL, + COMMIT_MESSAGE_SUBJECT_MAX_LENGTH, + COMMIT_MESSAGE_BODY_MAX_LENGTH, } from '../constants'; const initFormField = ({ value, required = true, skipValidation = false }) => ({ @@ -122,19 +124,16 @@ export default { return this.form.fields['commit_message'].value && this.form.fields['branch_name'].value; }, showHint() { - const commitMessageSubjectMaxLength = 52; - const commitMessageBodyMaxLength = 72; - const splitCommitMessageByLineBreak = this.form.fields['commit_message'].value .trim() .split('\n'); const [firstLine, ...otherLines] = splitCommitMessageByLineBreak; - const hasFirstLineExceedMaxLength = firstLine.length > commitMessageSubjectMaxLength; + const hasFirstLineExceedMaxLength = firstLine.length > COMMIT_MESSAGE_SUBJECT_MAX_LENGTH; const hasOtherLineExceedMaxLength = Boolean(otherLines.length) && - otherLines.some((text) => text.length > commitMessageBodyMaxLength); + otherLines.some((text) => text.length > COMMIT_MESSAGE_BODY_MAX_LENGTH); return ( !this.form.fields['commit_message'].feedback && diff --git a/app/assets/javascripts/repository/constants.js b/app/assets/javascripts/repository/constants.js index 2d2faa8d9f3..b536bcb1875 100644 --- a/app/assets/javascripts/repository/constants.js +++ b/app/assets/javascripts/repository/constants.js @@ -8,3 +8,6 @@ export const SECONDARY_OPTIONS_TEXT = __('Cancel'); export const COMMIT_LABEL = __('Commit message'); export const TARGET_BRANCH_LABEL = __('Target branch'); export const TOGGLE_CREATE_MR_LABEL = __('Start a new merge request with these changes'); + +export const COMMIT_MESSAGE_SUBJECT_MAX_LENGTH = 52; +export const COMMIT_MESSAGE_BODY_MAX_LENGTH = 72; diff --git a/app/assets/javascripts/security_configuration/components/constants.js b/app/assets/javascripts/security_configuration/components/constants.js index 44bb1bb1af8..ebe0138f046 100644 --- a/app/assets/javascripts/security_configuration/components/constants.js +++ b/app/assets/javascripts/security_configuration/components/constants.js @@ -157,7 +157,7 @@ export const securityFeatures = [ // This field will eventually come from the backend, the progress is // tracked in https://gitlab.com/gitlab-org/gitlab/-/issues/331621 - canEnableByMergeRequest: window.gon.features?.secDependencyScanningUiEnable, + canEnableByMergeRequest: true, }, { name: CONTAINER_SCANNING_NAME, diff --git a/app/helpers/invite_members_helper.rb b/app/helpers/invite_members_helper.rb index 3274ea15b8b..e9e5f8b3a0b 100644 --- a/app/helpers/invite_members_helper.rb +++ b/app/helpers/invite_members_helper.rb @@ -78,4 +78,9 @@ module InviteMembersHelper } ] end + + # Overridden in EE + def users_filter_data(group) + {} + end end diff --git a/app/views/groups/_invite_members_modal.html.haml b/app/views/groups/_invite_members_modal.html.haml index 8801ad98b8c..760efb16d40 100644 --- a/app/views/groups/_invite_members_modal.html.haml +++ b/app/views/groups/_invite_members_modal.html.haml @@ -2,4 +2,5 @@ .js-invite-members-modal{ data: { is_project: 'false', access_levels: GroupMember.access_level_roles.to_json, - help_link: help_page_url('user/permissions') }.merge(group_select_data(group)).merge(common_invite_modal_dataset(group)) } + default_access_level: Gitlab::Access::GUEST, + help_link: help_page_url('user/permissions') }.merge(group_select_data(group)).merge(common_invite_modal_dataset(group)).merge(users_filter_data(group)) } diff --git a/app/views/projects/_invite_members_modal.html.haml b/app/views/projects/_invite_members_modal.html.haml index 16964d2154a..f2fffeb23c5 100644 --- a/app/views/projects/_invite_members_modal.html.haml +++ b/app/views/projects/_invite_members_modal.html.haml @@ -2,4 +2,4 @@ .js-invite-members-modal{ data: { is_project: 'true', access_levels: ProjectMember.access_level_roles.to_json, - help_link: help_page_url('user/permissions') }.merge(common_invite_modal_dataset(project)) } + help_link: help_page_url('user/permissions') }.merge(common_invite_modal_dataset(project)).merge(users_filter_data(project.group)) } |