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: ...@@ -299,11 +299,7 @@ To delete a project:
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/37014) in GitLab 13.3 for Administrators. > - [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. > - [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. > - [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.
> - [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.
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.
When delayed project deletion is [enabled for a group](../group/index.md#enable-delayed-project-deletion), 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: 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 ...@@ -14,8 +14,7 @@ module EE
end end
condition(:adjourned_project_deletion_available) do condition(:adjourned_project_deletion_available) do
License.feature_available?(:adjourned_deletion_for_projects_and_groups) && License.feature_available?(:adjourned_deletion_for_projects_and_groups)
(::Feature.enabled?(:project_owners_list_project_pending_deletion, default_enabled: :yaml) || can?(:admin_all_resources))
end end
condition(:export_user_permissions_available) do 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 ...@@ -200,95 +200,43 @@ RSpec.describe GlobalPolicy do
end end
describe 'list_removable_projects' do 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 before do
stub_feature_flags(project_owners_list_project_pending_deletion: true) stub_licensed_features(adjourned_deletion_for_projects_and_groups: licensed?)
end end
context 'when user is an admin', :enable_admin_mode do context 'when licensed feature is enabled' do
let_it_be(:current_user) { admin } let(:licensed?) { true }
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) } 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
end end
context 'when user is a normal user' do context 'when licensed feature is not enabled' do
let_it_be(:current_user) { create(:user) } let(:licensed?) { false }
before do it { is_expected.to be_disallowed(:list_removable_projects) }
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
end end
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 before do
stub_feature_flags(project_owners_list_project_pending_deletion: false) stub_licensed_features(adjourned_deletion_for_projects_and_groups: licensed?)
end end
context 'when user is an admin', :enable_admin_mode do context 'when licensed feature is enabled' do
let_it_be(:current_user) { admin } let(:licensed?) { true }
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) } 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
end end
context 'when user is a normal user' do context 'when licensed feature is not enabled' do
let_it_be(:current_user) { create(:user) } let(:licensed?) { false }
before do it { is_expected.to be_disallowed(:list_removable_projects) }
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
end end
end 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