decidim-api 0.11.2 → 0.12.0.pre

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6967d636c84c6ee20181db66c5b34d8a8bdb724652710a34f65c828b4a6249d4
4
- data.tar.gz: fca2c5b21de1740af5392b32eb4232f0fb3e9631f7236eaeaa86a0ef8ef030cc
3
+ metadata.gz: d73e65fc81a61e32831606ae8c7110d02bad59d84be7ffdabbc2d3c30c84a83e
4
+ data.tar.gz: 1bf53cbfdbd7a386196b8a4965326b1101faaf8b88e603887593bb31c82d10a1
5
5
  SHA512:
6
- metadata.gz: da650d030a5d08e59ff6eb30041718840d74973ae177cb3d5ada15b669e5deeac9ea5f0cd47bdedfae28b4accef0879e7e64ba39810948420de647d3e70f4f39
7
- data.tar.gz: c088164240bc319310946426775b9274f308151dfd19cc46712c16e44a340e2e1e37544585a4a355a58d67d09c89e8ac4398138e30c99f0267ae2dbe71ff57b6
6
+ metadata.gz: 0befa753a5b42cff00a739895208e14ebae6a2f1335ca5525a87284d1bf4e5fe1f605b45cc7fb622698c7ff736765d75207d58cb8a5d833b8cc60689cb6c9014
7
+ data.tar.gz: f67849c18d7f997c6faa08cb3448deaa442f6016fc14f1e2153a0852aaba844113499fcc87360ec3f0251d364e8291dcc7e7ab3a2f55b03d458530d2a463459a
@@ -6,13 +6,15 @@ module Decidim
6
6
  class ApplicationController < ::DecidimController
7
7
  skip_before_action :verify_authenticity_token
8
8
  include NeedsOrganization
9
- include NeedsAuthorization
9
+ include NeedsPermission
10
10
  include ImpersonateUsers
11
11
 
12
- # Overwrites `cancancan`'s method to point to the correct ability class,
13
- # since the gem expects the ability class to be in the root namespace.
14
- def current_ability_klass
15
- Decidim::Abilities::BaseAbility
12
+ def permission_class_chain
13
+ [Decidim::Permissions]
14
+ end
15
+
16
+ def permission_scope
17
+ :public
16
18
  end
17
19
  end
18
20
  end
@@ -5,8 +5,6 @@ module Decidim
5
5
  # This controller takes queries from an HTTP endpoint and sends them out to
6
6
  # the Schema to be executed, later returning the response as JSON.
7
7
  class DocumentationController < Api::ApplicationController
8
- skip_authorization_check
9
-
10
8
  layout "decidim/api/documentation"
11
9
  end
12
10
  end
@@ -5,8 +5,6 @@ module Decidim
5
5
  # This controller takes queries from an HTTP endpoint and sends them out to
6
6
  # the Schema to be executed, later returning the response as JSON.
7
7
  class QueriesController < Api::ApplicationController
8
- skip_authorization_check
9
-
10
8
  def create
11
9
  query_string = params[:query]
12
10
  query_variables = ensure_hash(params[:variables])
File without changes
File without changes
File without changes
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-api version.
5
5
  module Api
6
6
  def self.version
7
- "0.11.2"
7
+ "0.12.0.pre"
8
8
  end
9
9
  end
10
10
  end
data/lib/decidim/api.rb CHANGED
@@ -6,10 +6,6 @@ module Decidim
6
6
  # This module holds all business logic related to exposing a Public API for
7
7
  # decidim.
8
8
  module Api
9
- autoload :MutationType, "decidim/api/mutation_type"
10
- autoload :QueryType, "decidim/api/query_type"
11
- autoload :Schema, "decidim/api/schema"
12
-
13
9
  # This declares all the types an interface or union can resolve to. This needs
14
10
  # to be done in order to be able to have them found. This is a shortcoming of
15
11
  # graphql-ruby and the way it deals with loading types, in combination with
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.2
4
+ version: 0.12.0.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-06-13 00:00:00.000000000 Z
13
+ date: 2018-06-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: graphiql-rails
@@ -74,56 +74,56 @@ dependencies:
74
74
  requirements:
75
75
  - - '='
76
76
  - !ruby/object:Gem::Version
77
- version: 0.11.2
77
+ version: 0.12.0.pre
78
78
  type: :development
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - - '='
83
83
  - !ruby/object:Gem::Version
84
- version: 0.11.2
84
+ version: 0.12.0.pre
85
85
  - !ruby/object:Gem::Dependency
86
86
  name: decidim-core
87
87
  requirement: !ruby/object:Gem::Requirement
88
88
  requirements:
89
89
  - - '='
90
90
  - !ruby/object:Gem::Version
91
- version: 0.11.2
91
+ version: 0.12.0.pre
92
92
  type: :development
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
96
  - - '='
97
97
  - !ruby/object:Gem::Version
98
- version: 0.11.2
98
+ version: 0.12.0.pre
99
99
  - !ruby/object:Gem::Dependency
100
100
  name: decidim-dev
101
101
  requirement: !ruby/object:Gem::Requirement
102
102
  requirements:
103
103
  - - '='
104
104
  - !ruby/object:Gem::Version
105
- version: 0.11.2
105
+ version: 0.12.0.pre
106
106
  type: :development
107
107
  prerelease: false
108
108
  version_requirements: !ruby/object:Gem::Requirement
109
109
  requirements:
110
110
  - - '='
111
111
  - !ruby/object:Gem::Version
112
- version: 0.11.2
112
+ version: 0.12.0.pre
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: decidim-participatory_processes
115
115
  requirement: !ruby/object:Gem::Requirement
116
116
  requirements:
117
117
  - - '='
118
118
  - !ruby/object:Gem::Version
119
- version: 0.11.2
119
+ version: 0.12.0.pre
120
120
  type: :development
121
121
  prerelease: false
122
122
  version_requirements: !ruby/object:Gem::Requirement
123
123
  requirements:
124
124
  - - '='
125
125
  - !ruby/object:Gem::Version
126
- version: 0.11.2
126
+ version: 0.12.0.pre
127
127
  description: API engine for decidim
128
128
  email:
129
129
  - josepjaume@gmail.com
@@ -140,15 +140,15 @@ files:
140
140
  - app/controllers/decidim/api/application_controller.rb
141
141
  - app/controllers/decidim/api/documentation_controller.rb
142
142
  - app/controllers/decidim/api/queries_controller.rb
143
+ - app/types/decidim/api/mutation_type.rb
144
+ - app/types/decidim/api/query_type.rb
145
+ - app/types/decidim/api/schema.rb
143
146
  - app/views/decidim/api/documentation/show.html.erb
144
147
  - app/views/layouts/decidim/api/documentation.html.erb
145
148
  - config/routes.rb
146
149
  - lib/decidim/api.rb
147
150
  - lib/decidim/api/engine.rb
148
151
  - lib/decidim/api/graphiql-initial-query.txt
149
- - lib/decidim/api/mutation_type.rb
150
- - lib/decidim/api/query_type.rb
151
- - lib/decidim/api/schema.rb
152
152
  - lib/decidim/api/test/type_context.rb
153
153
  - lib/decidim/api/version.rb
154
154
  - vendor/assets/javascripts/decidim/api/graphql-docs.js
@@ -169,9 +169,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
169
169
  version: '2.3'
170
170
  required_rubygems_version: !ruby/object:Gem::Requirement
171
171
  requirements:
172
- - - ">="
172
+ - - ">"
173
173
  - !ruby/object:Gem::Version
174
- version: '0'
174
+ version: 1.3.1
175
175
  requirements: []
176
176
  rubyforge_project:
177
177
  rubygems_version: 2.7.6