sso-auth 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sso/auth/engine.rb +2 -3
- data/lib/sso/auth/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4cd284dfbb8efce2a4612c70356087080a98b3c
|
4
|
+
data.tar.gz: a1ce9d9bd384c4268c62f7dd3b2a8a4656229776
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bbd6480a2acfb3d2bd88ff8ef6bbbb3188a51939a1e618daa85dd1965969b040e112c8bc5e452c46627857fc13ab9dc0d9805268c85d1b90f7e26e7cd877d56
|
7
|
+
data.tar.gz: fecb971958b77f930e4ad7713edd3a56d2647dcb1f14bdd5aaee9088f8bb943f0f91bf6c9cda41801e0363fe19efd8838d5d377d70a8446f02c17a63745cb0fc
|
data/lib/sso/auth/engine.rb
CHANGED
@@ -95,9 +95,8 @@ module Sso
|
|
95
95
|
belongs_to :context, :polymorphic => true
|
96
96
|
belongs_to :user
|
97
97
|
|
98
|
-
validates_inclusion_of
|
99
|
-
validates_presence_of
|
100
|
-
validates_uniqueness_of :role, :scope => [:user_id, :context_id, :context_type]
|
98
|
+
validates_inclusion_of :role, :in => available_roles + available_roles.map(&:to_sym)
|
99
|
+
validates_presence_of :role
|
101
100
|
|
102
101
|
scope :for_role, ->(role) { where(:role => role) }
|
103
102
|
scope :for_context, ->(context) { where(:context_id => context.try(:id), :context_type => context.try(:class)) }
|
data/lib/sso/auth/version.rb
CHANGED