Add initial current organization middleware
- for setting and using current organization throughout the app. - using middleware will allow us to make available in api, controller and graphql layers - move away from using our own CurrentOrganization module and use the rails provided CurrentAttributes which attaches to threads the same way and provides some default tooling. - see https://gitlab.com/gitlab-org/gitlab/-/issues/437541
显示
- app/models/current.rb 6 个添加, 0 个删除app/models/current.rb
- app/models/organizations/organization.rb 5 个添加, 1 个删除app/models/organizations/organization.rb
- app/models/organizations/organization_setting.rb 2 个添加, 4 个删除app/models/organizations/organization_setting.rb
- app/services/groups/create_service.rb 15 个添加, 7 个删除app/services/groups/create_service.rb
- config/feature_flags/gitlab_com_derisk/current_organization_middleware.yml 9 个添加, 0 个删除...ags/gitlab_com_derisk/current_organization_middleware.yml
- config/initializers/current_organization.rb 5 个添加, 0 个删除config/initializers/current_organization.rb
- ee/spec/requests/api/graphql/vulnerabilities/issue_links_spec.rb 2 个添加, 1 个删除.../requests/api/graphql/vulnerabilities/issue_links_spec.rb
- lib/gitlab/middleware/organizations/current.rb 29 个添加, 0 个删除lib/gitlab/middleware/organizations/current.rb
- lib/organization/current_organization.rb 0 个添加, 23 个删除lib/organization/current_organization.rb
- spec/features/groups_spec.rb 14 个添加, 0 个删除spec/features/groups_spec.rb
- spec/lib/gitlab/middleware/organizations/current_spec.rb 50 个添加, 0 个删除spec/lib/gitlab/middleware/organizations/current_spec.rb
- spec/lib/organization/current_organization_spec.rb 0 个添加, 66 个删除spec/lib/organization/current_organization_spec.rb
- spec/models/organizations/organization_setting_spec.rb 7 个添加, 17 个删除spec/models/organizations/organization_setting_spec.rb
- spec/models/organizations/organization_spec.rb 14 个添加, 0 个删除spec/models/organizations/organization_spec.rb
- spec/requests/api/graphql/mutations/merge_requests/set_assignees_spec.rb 2 个添加, 2 个删除...pi/graphql/mutations/merge_requests/set_assignees_spec.rb
- spec/requests/user_avatar_spec.rb 2 个添加, 2 个删除spec/requests/user_avatar_spec.rb
- spec/services/groups/create_service_spec.rb 20 个添加, 13 个删除spec/services/groups/create_service_spec.rb
- spec/support/shared_contexts/current_organization_context.rb 15 个添加, 0 个删除spec/support/shared_contexts/current_organization_context.rb
加载中
想要评论请 注册 或 登录