Commit 189526b7 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'remove-implicit-feature-flag-check-on-featurable' into 'master'

Remove implicit FF check on `Featurable` [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!52223
parents 4451fbe1 19bd62dd
......@@ -88,9 +88,6 @@ module Featurable
end
def feature_available?(feature, user)
# This feature might not be behind a feature flag at all, so default to true
return false unless ::Feature.enabled?(feature, user, default_enabled: true)
get_permission(user, feature)
end
......
---
title: Remove implicit FF check on `Featurable`
merge_request: 52223
author:
type: removed
---
name: builds
introduced_by_url:
rollout_issue_url:
milestone:
type: development
group:
default_enabled: true
---
name: forking
introduced_by_url:
rollout_issue_url:
milestone:
type: development
group: group::source code
default_enabled: true
---
name: issues
introduced_by_url:
rollout_issue_url:
milestone:
type: development
group:
default_enabled: true
---
name: merge_requests
introduced_by_url:
rollout_issue_url:
milestone:
type: development
group: group::code review
default_enabled: true
---
name: metrics_dashboard
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/29634
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/257902
milestone: '13.0'
type: development
group: group::monitor
default_enabled: true
---
name: operations
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/48347
rollout_issue_url:
milestone: '13.7'
type: development
group: group::editor
default_enabled: true
---
name: pages
introduced_by_url:
rollout_issue_url:
milestone:
type: development
group:
default_enabled: true
---
name: repository
introduced_by_url:
rollout_issue_url:
milestone:
type: development
group: group::source code
default_enabled: true
---
name: snippets
introduced_by_url:
rollout_issue_url:
milestone:
type: development
group:
default_enabled: true
---
name: wiki
introduced_by_url:
rollout_issue_url:
milestone:
type: development
group: group::editor
default_enabled: true
......@@ -134,22 +134,6 @@ RSpec.describe Featurable do
expect(project.feature_available?(:issues, user)).to eq(true)
end
end
context 'when feature is disabled by a feature flag' do
it 'returns false' do
stub_feature_flags(issues: false)
expect(project.feature_available?(:issues, user)).to eq(false)
end
end
context 'when feature is enabled by a feature flag' do
it 'returns true' do
stub_feature_flags(issues: true)
expect(project.feature_available?(:issues, user)).to eq(true)
end
end
end
describe '#*_enabled?' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment