From c25ca70a7466c6579bd5d8e346a92af99cf10f4d Mon Sep 17 00:00:00 2001 From: Eugie Limpin Date: Mon, 22 Sep 2025 10:43:51 +0800 Subject: [PATCH] Remove custom_ability_read_admin_projects feature flag - Admin users can now create custom admin roles with the read_admin_projects ability - Update GraphQL endpoint in /admin/projects from :projects to :admin_projects to support displaying unauthorized projects to non-admin users with read_admin_projects permission Changelog: changed --- .../admin/projects/index/components/app.vue | 16 +------ .../admin/projects/index/constants.js | 2 +- .../queries/admin_projects.query.graphql | 4 +- .../graphql/queries/projects.query.graphql | 42 ------------------- .../ee/admin/projects_controller.rb | 4 -- .../custom_ability_read_admin_projects.yml | 10 ----- .../projects/index/components/app_spec.js | 31 +++----------- spec/frontend/fixtures/admin.rb | 2 +- 8 files changed, 11 insertions(+), 100 deletions(-) delete mode 100644 app/assets/javascripts/admin/projects/index/graphql/queries/projects.query.graphql delete mode 100644 ee/config/feature_flags/beta/custom_ability_read_admin_projects.yml diff --git a/app/assets/javascripts/admin/projects/index/components/app.vue b/app/assets/javascripts/admin/projects/index/components/app.vue index fb4805a2195b74..c1500ef44113eb 100644 --- a/app/assets/javascripts/admin/projects/index/components/app.vue +++ b/app/assets/javascripts/admin/projects/index/components/app.vue @@ -8,13 +8,11 @@ import { FILTERED_SEARCH_TOKEN_REPOSITORY_CHECK_FAILED, } from '~/groups_projects/constants'; import { RECENT_SEARCHES_STORAGE_KEY_PROJECTS } from '~/filtered_search/recent_searches_storage_keys'; -import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import { TIMESTAMP_TYPE_CREATED_AT, TIMESTAMP_TYPE_LAST_ACTIVITY_AT, } from '~/vue_shared/components/resource_lists/constants'; import projectCountsQuery from '~/admin/projects/index/graphql/queries/project_counts.query.graphql'; -import adminProjectsQuery from '~/admin/projects/index/graphql/queries/admin_projects.query.graphql'; import { ADMIN_PROJECTS_TABS, SORT_OPTIONS, @@ -49,30 +47,18 @@ export default { components: { TabsWithList, }, - mixins: [glFeatureFlagMixin()], props: { programmingLanguages: { type: Array, required: true, }, }, - computed: { - tabs() { - const tabs = this.$options.ADMIN_PROJECTS_TABS; - - if (this.glFeatures.customAbilityReadAdminProjects) { - return tabs.map((tab) => ({ ...tab, query: adminProjectsQuery })); - } - - return tabs; - }, - }, };