Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2020-10-12 03:08:20 +00:00
parent 447a64b1dc
commit db4ee69eb3
4 changed files with 11 additions and 6 deletions

View File

@ -1,6 +1,5 @@
<script>
/* eslint-disable vue/no-v-html */
import { GlModal } from '@gitlab/ui';
import { GlModal, GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui';
import trackUninstallButtonClickMixin from 'ee_else_ce/clusters/mixins/track_uninstall_button_click';
import { sprintf, s__ } from '~/locale';
import {
@ -45,6 +44,9 @@ export default {
components: {
GlModal,
},
directives: {
SafeHtml,
},
mixins: [trackUninstallButtonClickMixin],
props: {
application: {
@ -94,6 +96,6 @@ export default {
:title="title"
@ok="confirmUninstall()"
>
{{ warningText }} <span v-html="customAppWarningText"></span>
{{ warningText }} <span v-safe-html="customAppWarningText"></span>
</gl-modal>
</template>

View File

@ -83,6 +83,7 @@ class Namespace < ApplicationRecord
scope :for_user, -> { where('type IS NULL') }
scope :sort_by_type, -> { order(Gitlab::Database.nulls_first_order(:type)) }
scope :include_route, -> { includes(:route) }
scope :with_statistics, -> do
joins('LEFT JOIN project_statistics ps ON ps.namespace_id = namespaces.id')

View File

@ -32,7 +32,9 @@ module API
get do
namespaces = current_user.admin ? Namespace.all : current_user.namespaces
namespaces = namespaces.include_gitlab_subscription if Gitlab.ee?
namespaces = namespaces.include_route
namespaces = namespaces.include_gitlab_subscription_with_hosted_plan if Gitlab.ee?
namespaces = namespaces.search(params[:search]) if params[:search].present?

View File

@ -29,8 +29,8 @@ module Gitlab
raise NotImplementedError, "Implement #find_object in #{self.class.name}"
end
def authorized_find!(*args)
object = Graphql::Lazy.force(find_object(*args))
def authorized_find!(*args, **kwargs)
object = Graphql::Lazy.force(find_object(*args, **kwargs))
authorize!(object)