Commit 9f7c63de authored by Nick Thomas's avatar Nick Thomas

Merge branch '334167-cleanup-project-authorizations-api-ff' into 'master'

Remove project authorizations API FF

See merge request gitlab-org/gitlab!71638
parents 0d9071af 6a4e306a
---
name: sort_by_project_users_by_project_authorizations_user_id
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/64528
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/334167
milestone: '14.1'
type: development
group: group::optimize
default_enabled: true
......@@ -658,10 +658,7 @@ module API
users = DeclarativePolicy.subject_scope { user_project.team.users }
users = users.search(params[:search]) if params[:search].present?
users = users.where_not_in(params[:skip_users]) if params[:skip_users].present?
if Feature.enabled?(:sort_by_project_users_by_project_authorizations_user_id, user_project, default_enabled: :yaml)
users = users.order('project_authorizations.user_id' => :asc) # rubocop: disable CodeReuse/ActiveRecord
end
users = users.order('project_authorizations.user_id' => :asc) # rubocop: disable CodeReuse/ActiveRecord
present paginate(users), with: Entities::UserBasic
end
......
......@@ -2684,26 +2684,9 @@ RSpec.describe API::Projects do
context 'when authenticated' do
context 'valid request' do
context 'when sort_by_project_authorizations_user_id FF is off' do
before do
stub_feature_flags(sort_by_project_users_by_project_authorizations_user_id: false)
end
it_behaves_like 'project users response' do
let(:project) { project4 }
let(:current_user) { user4 }
end
end
context 'when sort_by_project_authorizations_user_id FF is on' do
before do
stub_feature_flags(sort_by_project_users_by_project_authorizations_user_id: true)
end
it_behaves_like 'project users response' do
let(:project) { project4 }
let(:current_user) { user4 }
end
it_behaves_like 'project users response' do
let(:project) { project4 }
let(:current_user) { user4 }
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