Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
447a64b1dc
commit
db4ee69eb3
|
@ -1,6 +1,5 @@
|
||||||
<script>
|
<script>
|
||||||
/* eslint-disable vue/no-v-html */
|
import { GlModal, GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui';
|
||||||
import { GlModal } from '@gitlab/ui';
|
|
||||||
import trackUninstallButtonClickMixin from 'ee_else_ce/clusters/mixins/track_uninstall_button_click';
|
import trackUninstallButtonClickMixin from 'ee_else_ce/clusters/mixins/track_uninstall_button_click';
|
||||||
import { sprintf, s__ } from '~/locale';
|
import { sprintf, s__ } from '~/locale';
|
||||||
import {
|
import {
|
||||||
|
@ -45,6 +44,9 @@ export default {
|
||||||
components: {
|
components: {
|
||||||
GlModal,
|
GlModal,
|
||||||
},
|
},
|
||||||
|
directives: {
|
||||||
|
SafeHtml,
|
||||||
|
},
|
||||||
mixins: [trackUninstallButtonClickMixin],
|
mixins: [trackUninstallButtonClickMixin],
|
||||||
props: {
|
props: {
|
||||||
application: {
|
application: {
|
||||||
|
@ -94,6 +96,6 @@ export default {
|
||||||
:title="title"
|
:title="title"
|
||||||
@ok="confirmUninstall()"
|
@ok="confirmUninstall()"
|
||||||
>
|
>
|
||||||
{{ warningText }} <span v-html="customAppWarningText"></span>
|
{{ warningText }} <span v-safe-html="customAppWarningText"></span>
|
||||||
</gl-modal>
|
</gl-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -83,6 +83,7 @@ class Namespace < ApplicationRecord
|
||||||
|
|
||||||
scope :for_user, -> { where('type IS NULL') }
|
scope :for_user, -> { where('type IS NULL') }
|
||||||
scope :sort_by_type, -> { order(Gitlab::Database.nulls_first_order(:type)) }
|
scope :sort_by_type, -> { order(Gitlab::Database.nulls_first_order(:type)) }
|
||||||
|
scope :include_route, -> { includes(:route) }
|
||||||
|
|
||||||
scope :with_statistics, -> do
|
scope :with_statistics, -> do
|
||||||
joins('LEFT JOIN project_statistics ps ON ps.namespace_id = namespaces.id')
|
joins('LEFT JOIN project_statistics ps ON ps.namespace_id = namespaces.id')
|
||||||
|
|
|
@ -32,7 +32,9 @@ module API
|
||||||
get do
|
get do
|
||||||
namespaces = current_user.admin ? Namespace.all : current_user.namespaces
|
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?
|
namespaces = namespaces.search(params[:search]) if params[:search].present?
|
||||||
|
|
||||||
|
|
|
@ -29,8 +29,8 @@ module Gitlab
|
||||||
raise NotImplementedError, "Implement #find_object in #{self.class.name}"
|
raise NotImplementedError, "Implement #find_object in #{self.class.name}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def authorized_find!(*args)
|
def authorized_find!(*args, **kwargs)
|
||||||
object = Graphql::Lazy.force(find_object(*args))
|
object = Graphql::Lazy.force(find_object(*args, **kwargs))
|
||||||
|
|
||||||
authorize!(object)
|
authorize!(object)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue