doorkeeper 2.2.1 → 2.2.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of doorkeeper might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/NEWS.md +12 -0
- data/README.md +0 -1
- data/lib/doorkeeper/engine.rb +3 -1
- data/lib/doorkeeper/models/access_grant_mixin.rb +2 -1
- data/lib/doorkeeper/models/access_token_mixin.rb +2 -1
- data/lib/doorkeeper/models/application_mixin.rb +2 -1
- data/lib/doorkeeper/orm/active_record.rb +4 -3
- data/lib/doorkeeper/orm/mongoid2/concerns/scopes.rb +1 -1
- data/lib/doorkeeper/orm/mongoid3/concerns/scopes.rb +1 -1
- data/lib/doorkeeper/orm/mongoid4/concerns/scopes.rb +1 -1
- data/lib/doorkeeper/version.rb +1 -1
- data/spec/dummy/app/models/user.rb +3 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d6335a06e80f4b3c0deaf0df17f7179c454024e
|
4
|
+
data.tar.gz: f0fcb5b41952e00cb778207346bbd3fa60ae837a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10eb65f7b258c5408c176f5fc7c4f348ddb66a27f5254ab7aeab0f166766f4fcbf5a804b411093add7d62d38f7861493d205893937932a2beed4b573a8263922
|
7
|
+
data.tar.gz: 0e2a01becb02cee6f520e1c180d234e8bc1262d67330239cb5034ebe6ff89442daa44cc45201895eb4d92689f7e3e0823874d8723247593eca179d3c45b67131
|
data/NEWS.md
CHANGED
@@ -4,6 +4,18 @@ User-visible changes worth mentioning.
|
|
4
4
|
|
5
5
|
---
|
6
6
|
|
7
|
+
## 2.2.2
|
8
|
+
|
9
|
+
- [#654] Fixed `check_requirements` not to abort when ActiveRecord
|
10
|
+
`oauth_applications` table does not have the `scopes` column.
|
11
|
+
(Issue #653)
|
12
|
+
- [#599] Included MassAssignmentSecurity in mixins if
|
13
|
+
::ProtectedAttributes is defined.
|
14
|
+
- [#650] Only fallback i18n when it is not set.
|
15
|
+
- [#541] Fixed `undefined method attr_accessible` problem on Rails 4
|
16
|
+
(happens only when ProtectedAttributes gem is used) in #599
|
17
|
+
- [#689] Allow scopes to me resetted to empty in Mongoid
|
18
|
+
|
7
19
|
## 2.2.1
|
8
20
|
|
9
21
|
- [#636] `custom_access_token_expires_in` bugfixes
|
data/README.md
CHANGED
data/lib/doorkeeper/engine.rb
CHANGED
@@ -7,11 +7,12 @@ module Doorkeeper
|
|
7
7
|
include Models::Revocable
|
8
8
|
include Models::Accessible
|
9
9
|
include Models::Scopes
|
10
|
+
include ActiveModel::MassAssignmentSecurity if defined?(::ProtectedAttributes)
|
10
11
|
|
11
12
|
included do
|
12
13
|
belongs_to :application, class_name: 'Doorkeeper::Application', inverse_of: :access_grants
|
13
14
|
|
14
|
-
if
|
15
|
+
if respond_to?(:attr_accessible)
|
15
16
|
attr_accessible :resource_owner_id, :application_id, :expires_in, :redirect_uri, :scopes
|
16
17
|
end
|
17
18
|
|
@@ -7,6 +7,7 @@ module Doorkeeper
|
|
7
7
|
include Models::Revocable
|
8
8
|
include Models::Accessible
|
9
9
|
include Models::Scopes
|
10
|
+
include ActiveModel::MassAssignmentSecurity if defined?(::ProtectedAttributes)
|
10
11
|
|
11
12
|
included do
|
12
13
|
belongs_to :application,
|
@@ -18,7 +19,7 @@ module Doorkeeper
|
|
18
19
|
|
19
20
|
attr_writer :use_refresh_token
|
20
21
|
|
21
|
-
if
|
22
|
+
if respond_to?(:attr_accessible)
|
22
23
|
attr_accessible :application_id, :resource_owner_id, :expires_in,
|
23
24
|
:scopes, :use_refresh_token
|
24
25
|
end
|
@@ -4,6 +4,7 @@ module Doorkeeper
|
|
4
4
|
|
5
5
|
include OAuth::Helpers
|
6
6
|
include Models::Scopes
|
7
|
+
include ActiveModel::MassAssignmentSecurity if defined?(::ProtectedAttributes)
|
7
8
|
|
8
9
|
included do
|
9
10
|
has_many :access_grants, dependent: :destroy, class_name: 'Doorkeeper::AccessGrant'
|
@@ -15,7 +16,7 @@ module Doorkeeper
|
|
15
16
|
|
16
17
|
before_validation :generate_uid, :generate_secret, on: :create
|
17
18
|
|
18
|
-
if
|
19
|
+
if respond_to?(:attr_accessible)
|
19
20
|
attr_accessible :name, :redirect_uri
|
20
21
|
end
|
21
22
|
end
|
@@ -25,11 +25,12 @@ module Doorkeeper
|
|
25
25
|
Doorkeeper::Application.table_name
|
26
26
|
)
|
27
27
|
unless Doorkeeper::Application.new.attributes.include?("scopes")
|
28
|
-
|
28
|
+
migration_path = '../../../generators/doorkeeper/templates/add_scopes_to_oauth_applications.rb'
|
29
|
+
puts <<-MSG.squish
|
29
30
|
[doorkeeper] Missing column: `oauth_applications.scopes`.
|
30
|
-
|
31
|
-
&& rake db:migrate` to add it.
|
31
|
+
Create the following migration and run `rake db:migrate`.
|
32
32
|
MSG
|
33
|
+
puts File.read(File.expand_path(migration_path, __FILE__))
|
33
34
|
end
|
34
35
|
end
|
35
36
|
end
|
data/lib/doorkeeper/version.rb
CHANGED
@@ -21,7 +21,9 @@ when "mongo_mapper"
|
|
21
21
|
end
|
22
22
|
|
23
23
|
class User
|
24
|
-
|
24
|
+
include ActiveModel::MassAssignmentSecurity if defined?(::ProtectedAttributes)
|
25
|
+
|
26
|
+
if respond_to?(:attr_accessible)
|
25
27
|
attr_accessible :name, :password
|
26
28
|
end
|
27
29
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: doorkeeper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felipe Elias Philipp
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-07-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|
@@ -571,3 +571,4 @@ test_files:
|
|
571
571
|
- spec/support/shared/controllers_shared_context.rb
|
572
572
|
- spec/support/shared/models_shared_examples.rb
|
573
573
|
- spec/validators/redirect_uri_validator_spec.rb
|
574
|
+
has_rdoc:
|