diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
commit | a7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch) | |
tree | 7452bd5c3545c2fa67a28aa013835fb4fa071baf /lib/feature.rb | |
parent | ee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff) |
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
Diffstat (limited to 'lib/feature.rb')
-rw-r--r-- | lib/feature.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/feature.rb b/lib/feature.rb index 12b4ef07dd6..47fee23c7ea 100644 --- a/lib/feature.rb +++ b/lib/feature.rb @@ -245,11 +245,11 @@ class Feature end def gate_specified? - %i(user project group feature_group).any? { |key| params.key?(key) } + %i(user project group feature_group namespace).any? { |key| params.key?(key) } end def targets - [feature_group, user, project, group].compact + [feature_group, user, project, group, namespace].compact end private @@ -279,6 +279,13 @@ class Feature Group.find_by_full_path(params[:group]) end + + def namespace + return unless params.key?(:namespace) + + # We are interested in Group or UserNamespace + Namespace.without_project_namespaces.find_by_full_path(params[:namespace]) + end end end |