Add GraphQL schema support for Security Manager role

Summary

Adds Security Manager access level to the GraphQL schema with runtime visibility control based on the GITLAB_SECURITY_MANAGER_ROLE feature flag.

References

Related to #582642

Changes

  • Add SECURITY_MANAGER enum value to AccessLevelEnum with visible?(context) method for runtime visibility control
  • Enable GraphQL::Schema::Visibility in GitlabSchema to support conditional enum value visibility
  • Add test specs to verify SECURITY_MANAGER appears/disappears based on the feature flag

Test Plan

  • Run specs: bundle exec rspec spec/graphql/types/access_level_enum_spec.rb and ee/spec/graphql/types/gitlab_subscriptions/user_role_enum_spec.rb.
  • Verify SECURITY_MANAGER appears in GraphQL introspection when the feature flag is enabled
  • Verify that enum values are working like before when the feature flag is disabled.

Built on top of: 582639-add-security-manager-role-infrastructure

Edited by Miki Amos

Merge request reports

Loading