Expose deploy key in push access level graphql type
Branch rules requires us to display when a deploy key is assigned to the push access levels. Prior to this change we didn't return deploy key's as a type. In EE we expose `user` and `group` as their own types so clients can differentiate between role access levels. Used as inspiration to expose `deploy_key`s. Adds a new policy rule to `DeployKeyPolicy` to enable `read_deploy_key` if the deploy key is public or the user has access to a project where the key is assigned. Changelog: added
显示
- app/graphql/types/access_levels/deploy_key_type.rb 32 个添加, 0 个删除app/graphql/types/access_levels/deploy_key_type.rb
- app/graphql/types/access_levels/user_type.rb 1 个添加, 1 个删除app/graphql/types/access_levels/user_type.rb
- app/graphql/types/branch_protections/push_access_level_type.rb 5 个添加, 0 个删除...raphql/types/branch_protections/push_access_level_type.rb
- app/policies/deploy_key_policy.rb 7 个添加, 3 个删除app/policies/deploy_key_policy.rb
- doc/api/graphql/reference/index.md 15 个添加, 1 个删除doc/api/graphql/reference/index.md
- ee/spec/graphql/ee/types/branch_protections/push_access_level_type_spec.rb 1 个添加, 1 个删除...e/types/branch_protections/push_access_level_type_spec.rb
- spec/factories/keys.rb 9 个添加, 1 个删除spec/factories/keys.rb
- spec/graphql/types/access_levels/deploy_key_type_spec.rb 13 个添加, 0 个删除spec/graphql/types/access_levels/deploy_key_type_spec.rb
- spec/graphql/types/access_levels/user_type_spec.rb 1 个添加, 1 个删除spec/graphql/types/access_levels/user_type_spec.rb
- spec/graphql/types/branch_protections/push_access_level_type_spec.rb 2 个添加, 2 个删除...l/types/branch_protections/push_access_level_type_spec.rb
- spec/policies/deploy_key_policy_spec.rb 60 个添加, 40 个删除spec/policies/deploy_key_policy_spec.rb
加载中
想要评论请 注册 或 登录