diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-26 00:09:19 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-26 00:09:19 +0300 |
commit | 53b40a871dc13d9c1d743b1f57fcf50eceb0a64f (patch) | |
tree | 89dcf6d8dd885bfd5d0f3f15e6a5b99e0073b671 /app | |
parent | d612723c35d7fdaeb8b09e91232053e04850c2ae (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
3 files changed, 8 insertions, 20 deletions
diff --git a/app/assets/javascripts/vue_shared/components/filtered_search_bar/constants.js b/app/assets/javascripts/vue_shared/components/filtered_search_bar/constants.js index 2e295f7565b..f9f4e981863 100644 --- a/app/assets/javascripts/vue_shared/components/filtered_search_bar/constants.js +++ b/app/assets/javascripts/vue_shared/components/filtered_search_bar/constants.js @@ -27,23 +27,16 @@ export const OPERATORS_IS_NOT_OR = [...OPERATORS_IS, ...OPERATORS_NOT, ...OPERAT export const OPTION_NONE = { value: FILTER_NONE, text: __('None'), title: __('None') }; export const OPTION_ANY = { value: FILTER_ANY, text: __('Any'), title: __('Any') }; export const OPTION_CURRENT = { value: FILTER_CURRENT, text: __('Current') }; - -export const OPTIONS_NONE_ANY = [OPTION_NONE, OPTION_ANY]; - -export const DEFAULT_MILESTONE_UPCOMING = { +export const OPTION_STARTED = { value: FILTER_STARTED, text: __('Started'), title: __('Started') }; +export const OPTION_UPCOMING = { value: FILTER_UPCOMING, text: __('Upcoming'), title: __('Upcoming'), }; -export const DEFAULT_MILESTONE_STARTED = { - value: FILTER_STARTED, - text: __('Started'), - title: __('Started'), -}; -export const DEFAULT_MILESTONES = OPTIONS_NONE_ANY.concat([ - DEFAULT_MILESTONE_UPCOMING, - DEFAULT_MILESTONE_STARTED, -]); + +export const OPTIONS_NONE_ANY = [OPTION_NONE, OPTION_ANY]; + +export const DEFAULT_MILESTONES = OPTIONS_NONE_ANY.concat([OPTION_UPCOMING, OPTION_STARTED]); export const SORT_DIRECTION = { descending: 'descending', diff --git a/app/controllers/concerns/lfs_request.rb b/app/controllers/concerns/lfs_request.rb index 97df3c7caea..8acbba0621b 100644 --- a/app/controllers/concerns/lfs_request.rb +++ b/app/controllers/concerns/lfs_request.rb @@ -85,8 +85,7 @@ module LfsRequest def deploy_token_can_download_code? deploy_token.present? && - deploy_token.project == project && - deploy_token.active? && + deploy_token.has_access_to?(project) && deploy_token.read_repository? end diff --git a/app/services/clusters/agents/refresh_authorization_service.rb b/app/services/clusters/agents/refresh_authorization_service.rb index 54b90a7304c..53b14ab54da 100644 --- a/app/services/clusters/agents/refresh_authorization_service.rb +++ b/app/services/clusters/agents/refresh_authorization_service.rb @@ -83,11 +83,7 @@ module Clusters end def allowed_projects - if group_root_ancestor? - root_ancestor.all_projects - else - ::Project.id_in(project.id) - end + root_ancestor.all_projects end def allowed_groups |