Skip to content
代码片段 群组 项目
该项目从 https://gitlab.com/gitlab-org/gitlab.git 镜像。 拉取镜像更新于
  1. 8月 23, 2022
  2. 8月 05, 2022
  3. 6月 15, 2022
  4. 5月 30, 2022
  5. 5月 21, 2022
  6. 1月 20, 2022
  7. 8月 03, 2021
  8. 7月 12, 2021
  9. 6月 29, 2021
  10. 4月 19, 2021
  11. 3月 29, 2021
  12. 3月 27, 2021
  13. 3月 22, 2021
  14. 3月 18, 2021
    • charlie ablett's avatar
      Replace Authorize instrument with gem auth · 8d7a47f8
      charlie ablett 创作于
      
      This changes our GraphQL code to use the built-in `#authorize` methods
      to handle permissions.
      
      We originally implemented this functionality with a field-extension,
      but this is no longer necessary. This commit replaces that unnecessary
      field extension with implementations of `BaseObject#authorize` that
      use our policy framework.
      
      Significant changes included here:
      
      - field authorization now works as per the library specification: it
        authorizes against the current object, not the resolved value.
        To apply permissions to the resolved value, use the type permissions.
      - we allow resolvers to do the same (opt-in).
      - we extend authorization to enums (currently no enums use
        authorization).
      
      Note on enums:
      We don't actually have any authorization on enums, but we need to detect
      that efficiently. By supporting `ObjectAuthorization`, we can skip
      redaction now, and support it later (if we add enum members that require
      special authorization to see).
      
      Removals:
      
      - The ManualAuthorization temporary class
      - The synchronized_object method on BaseResolver
      - Field.authorize DSL method
      
      Changes:
      
      The error raised when there is no auth becomes an internal server
      error (ConfigurationError) since it cannot be caused by the client,
      and represents a programming mistake.
      
      The board issue move mutation has unnecessary logic removed, and the
      test for this is adjusted to verify the correctness of this change.
      
      Co-authored-by: default avatarAlex Kalderimis <akalderimis@gitlab.com>
      Co-authored-by: default avatarCharlie Ablett <cablett@gitlab.com>
      8d7a47f8
  15. 3月 02, 2021
  16. 12月 04, 2020
  17. 9月 21, 2020
    • Kamil Trzciński's avatar
      Make `development` flags to be `required` · 9145ed53
      Kamil Trzciński 创作于
      This does:
      
      - add all leftover `development` feature flags
      - ensures that licensed `feature flags` are actually checked
        against `type: :licensed`
      - makes `development` to be `optional: false`, aka `required`
      9145ed53
  18. 8月 07, 2020
  19. 6月 16, 2020
  20. 3月 18, 2020
    • Brett Walker's avatar
      Upgrade to graphql gem to 1.10.5 · 846ef5c2
      Brett Walker 创作于
      - Fix how we call include_graphql_fields
      from described_class.new to described_class
      - Fix require_graphql_authorizations matcher
      - Update have_graphql_type and have_graphql_resolver
      - Fix how we call require_graphql_authorizations
      from described_class.new to described_class
      - Fix how we call have_graphql_fields
      from described_class.new to described_class
      - Fix how we call have_graphql_field
      from described_class.new to described_class
      - Add `field_with_params` graphql helper
      - Fix how `field_type` determines type
      - Use `resolve_field` instead of `resolve`
      so that `extras` metadata is properly processed
      - Fix returned error message check
      846ef5c2
  21. 2月 18, 2020
  22. 1月 31, 2020
  23. 10月 29, 2019
  24. 9月 05, 2019
    • Brett Walker's avatar
      Upgrade graphql gem to 1.9.10 · ec2b4bb6
      Brett Walker 创作于
      - `edge_nodes` needs to get called on the object
      - added `include GlobalID::Identification` in a couple places
      - renamed `object` to `item` in spec due to conflict
      ec2b4bb6
    • Brett Walker's avatar
      Upgrade graphql gem to 1.9.10 · 448e44f7
      Brett Walker 创作于
      - `edge_nodes` needs to get called on the object
      - added `include GlobalID::Identification` in a couple places
      - renamed `object` to `item` in spec due to conflict
      448e44f7
  25. 6月 04, 2019
    • Bob Van Landuyt's avatar
      Expose IDs in GraphQL as a GlobalID · ed503d51
      Bob Van Landuyt 创作于
      This exposes all fields named `id` as GlobalIDs so they can be used
      across our entire GraphQL implementation.
      
      When the objects loaded are `ApplicationRecord`s. We'll use our
      existing batchloading to find them. Otherwise, we'll fall back to the
      default implementation of `GlobalID`: Calling the `.find` method on
      the class.
      ed503d51
  26. 4月 18, 2019
  27. 4月 04, 2019
  28. 4月 03, 2019
    • Luke Duncalfe's avatar
      GraphQL Type authorization · 8207f787
      Luke Duncalfe 创作于
      Enables authorizations to be defined on GraphQL Types.
      
          module Types
            class ProjectType < BaseObject
              authorize :read_project
            end
          end
      
      If a field has authorizations defined on it, and the return type of the
      field also has authorizations defined on it. then all of the combined
      permissions in the authorizations will be checked and must pass.
      
      Connection fields are checked by "digging" to find the type class of the
      "node" field in the expected location of edges->node.
      
      Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/54417
      8207f787
  29. 2月 26, 2019
    • Luke Duncalfe's avatar
      Improve GraphQL Authorization DSL · ccb4edbc
      Luke Duncalfe 创作于
      Previously GraphQL field authorization happened like this:
      
          class ProjectType
            field :my_field, MyFieldType do
              authorize :permission
            end
          end
      
      This change allowed us to authorize like this instead:
      
          class ProjectType
            field :my_field, MyFieldType, authorize: :permission
          end
      
      A new initializer registers the `authorize` metadata keyword on GraphQL
      Schema Objects and Fields, and we can collect this data within the
      context of Instrumentation like this:
      
          field.metadata[:authorize]
      
      The previous functionality of authorize is still being used for
      mutations, as the #authorize method here is called at during the code
      that executes during the mutation, rather than when a field resolves.
      
      https://gitlab.com/gitlab-org/gitlab-ce/issues/57828
      ccb4edbc
加载中