Commit Graph

17 Commits

Author SHA1 Message Date
GitLab Bot 7d8cc770b1 Add latest changes from gitlab-org/gitlab@master 2023-03-29 03:12:19 +00:00
GitLab Bot 2eff77c2ef Add latest changes from gitlab-org/gitlab@master 2023-02-03 21:08:05 +00:00
GitLab Bot f1284938ed Add latest changes from gitlab-org/gitlab@master 2022-05-30 12:08:23 +00:00
GitLab Bot a8476fe0cd Add latest changes from gitlab-org/gitlab@master 2021-06-15 18:09:57 +00:00
GitLab Bot 4d16568658 Add latest changes from gitlab-org/gitlab@master 2021-03-18 06:11:52 +00:00
GitLab Bot 4e5a71c197 Add latest changes from gitlab-org/gitlab@master 2020-11-20 18:09:37 +00:00
GitLab Bot db4ee69eb3 Add latest changes from gitlab-org/gitlab@master 2020-10-12 03:08:20 +00:00
GitLab Bot a0b26c6df5 Add latest changes from gitlab-org/gitlab@master 2020-06-29 12:09:20 +00:00
GitLab Bot a5ab3467a7 Add latest changes from gitlab-org/gitlab@master 2020-01-13 15:07:53 +00:00
GitLab Bot 17b91a3c6a Add latest changes from gitlab-org/gitlab@master 2019-12-13 09:08:01 +00:00
GitLab Bot 80f61b4035 Add latest changes from gitlab-org/gitlab@master 2019-09-18 14:02:45 +00:00
Brett Walker aa7b1cfc5b Upgrade GraphQL gem to 1.8.17
- Due to https://github.com/exAspArk/batch-loader/pull/32,
we  changed BatchLoader.for into BatchLoader::GraphQL.for
- since our results are wrapped in a BatchLoader::GraphQL,
calling `sync` during authorization is required to get real object
- `graphql` now has it's own authorization system.  Our
`authorized?` method conflicted and required renaming
2019-09-04 17:42:48 +00:00
Luke Duncalfe bbdcbd98ae Remove unused authorized_find method
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/29921#note_184713939
2019-06-26 10:15:14 +12:00
Luke Duncalfe b2a615c3c6 Sanity check for GraphQL authorized?
Raise an exception if a developer calls any of the GraphQL authorization
methods and a `authorize :permission` is missing from a mutation class.

Previously `authorized?` would return `true` in this situation, which
although technically is accurate is not what a developer is intending.
2019-06-26 10:12:35 +12:00
Luke Duncalfe ccb4edbca1 Improve GraphQL Authorization DSL
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
2019-02-26 10:22:12 +13:00
gfyoung ebf98f27c4 Enable even more frozen string in lib/gitlab
Enables frozen string for the following:

* lib/gitlab/fogbugz_import/**/*.rb
* lib/gitlab/gfm/**/*.rb
* lib/gitlab/git/**/*.rb
* lib/gitlab/gitaly_client/**/*.rb
* lib/gitlab/gitlab_import/**/*.rb
* lib/gitlab/google_code_import/**/*.rb
* lib/gitlab/gpg/**/*.rb
* lib/gitlab/grape_logging/**/*.rb
* lib/gitlab/graphql/**/*.rb
* lib/gitlab/graphs/**/*.rb
* lib/gitlab/hashed_storage/**/*.rb
* lib/gitlab/health_checks/**/*.rb

Partially address gitlab-org/gitlab-ce#47424.
2018-11-13 11:42:15 -08:00
Bob Van Landuyt 3bcb04f100 Add mutation toggling WIP state of merge requests
This is mainly the setup of mutations for GraphQL. Including
authorization and basic return type-structure.
2018-07-25 18:37:12 +02:00