Commit c9af8d77 authored by Max Woolf's avatar Max Woolf

Merge branch '351556_remove_ff_project_owners_list_project_pending_deletion' into 'master'

Remove feature flag project_owners_list_project_pending_deletion

See merge request gitlab-org/gitlab!82372
parents 55bc8d11 323e070b
......@@ -299,11 +299,7 @@ To delete a project:
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/37014) in GitLab 13.3 for Administrators.
> - [Tab renamed](https://gitlab.com/gitlab-org/gitlab/-/issues/347468) from **Deleted projects** in GitLab 14.6.
> - [Available to all users](https://gitlab.com/gitlab-org/gitlab/-/issues/346976) in GitLab 14.8 [with a flag](../../administration/feature_flags.md) named `project_owners_list_project_pending_deletion`. Enabled by default.
FLAG:
On self-managed GitLab, by default this feature is available to all users. To make it available for administrators only,
ask an administrator to [disable the feature flag](../../administration/feature_flags.md) named `project_owners_list_project_pending_deletion`.
On GitLab.com, this feature is available to all users.
> - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/351556) in GitLab 14.9. [Feature flag `project_owners_list_project_pending_deletion`](https://gitlab.com/gitlab-org/gitlab/-/issues/351556) removed.
When delayed project deletion is [enabled for a group](../group/index.md#enable-delayed-project-deletion),
projects within that group are not deleted immediately, but only after a delay. To access a list of all projects that are pending deletion:
......
......@@ -14,8 +14,7 @@ module EE
end
condition(:adjourned_project_deletion_available) do
License.feature_available?(:adjourned_deletion_for_projects_and_groups) &&
(::Feature.enabled?(:project_owners_list_project_pending_deletion, default_enabled: :yaml) || can?(:admin_all_resources))
License.feature_available?(:adjourned_deletion_for_projects_and_groups)
end
condition(:export_user_permissions_available) do
......
---
name: project_owners_list_project_pending_deletion
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/76484
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/350727
milestone: '14.8'
type: development
group: group::compliance
default_enabled: true
......@@ -200,95 +200,43 @@ RSpec.describe GlobalPolicy do
end
describe 'list_removable_projects' do
context 'when feature flag is enabled' do
context 'when user is an admin', :enable_admin_mode do
let_it_be(:current_user) { admin }
before do
stub_feature_flags(project_owners_list_project_pending_deletion: true)
stub_licensed_features(adjourned_deletion_for_projects_and_groups: licensed?)
end
context 'when user is an admin', :enable_admin_mode do
let_it_be(:current_user) { admin }
before do
stub_licensed_features(adjourned_deletion_for_projects_and_groups: licensed?)
end
context 'when licensed feature is enabled' do
let(:licensed?) { true }
context 'when licensed feature is enabled' do
let(:licensed?) { true }
it { is_expected.to be_allowed(:list_removable_projects) }
end
context 'when licensed feature is not enabled' do
let(:licensed?) { false }
it { is_expected.to be_disallowed(:list_removable_projects) }
end
it { is_expected.to be_allowed(:list_removable_projects) }
end
context 'when user is a normal user' do
let_it_be(:current_user) { create(:user) }
context 'when licensed feature is not enabled' do
let(:licensed?) { false }
before do
stub_licensed_features(adjourned_deletion_for_projects_and_groups: licensed?)
end
context 'when licensed feature is enabled' do
let(:licensed?) { true }
it { is_expected.to be_allowed(:list_removable_projects) }
end
context 'when licensed feature is not enabled' do
let(:licensed?) { false }
it { is_expected.to be_disallowed(:list_removable_projects) }
end
it { is_expected.to be_disallowed(:list_removable_projects) }
end
end
context 'when feature flag is disabled' do
context 'when user is a normal user' do
let_it_be(:current_user) { create(:user) }
before do
stub_feature_flags(project_owners_list_project_pending_deletion: false)
stub_licensed_features(adjourned_deletion_for_projects_and_groups: licensed?)
end
context 'when user is an admin', :enable_admin_mode do
let_it_be(:current_user) { admin }
before do
stub_licensed_features(adjourned_deletion_for_projects_and_groups: licensed?)
end
context 'when licensed feature is enabled' do
let(:licensed?) { true }
context 'when licensed feature is enabled' do
let(:licensed?) { true }
it { is_expected.to be_allowed(:list_removable_projects) }
end
context 'when licensed feature is not enabled' do
let(:licensed?) { false }
it { is_expected.to be_disallowed(:list_removable_projects) }
end
it { is_expected.to be_allowed(:list_removable_projects) }
end
context 'when user is a normal user' do
let_it_be(:current_user) { create(:user) }
context 'when licensed feature is not enabled' do
let(:licensed?) { false }
before do
stub_licensed_features(adjourned_deletion_for_projects_and_groups: licensed?)
end
context 'when licensed feature is enabled' do
let(:licensed?) { true }
it { is_expected.to be_disallowed(:list_removable_projects) }
end
context 'when licensed feature is not enabled' do
let(:licensed?) { false }
it { is_expected.to be_disallowed(:list_removable_projects) }
end
it { is_expected.to be_disallowed(:list_removable_projects) }
end
end
end
......
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