unidom-authorization 1.6 → 1.6.1
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7984b6c161a9b4aca20a2cde74685ae17608f298
|
4
|
+
data.tar.gz: 23452781745ca69a5d06a94536f242cb61dfd02b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cca7a56defb0241a5591abe3a98e10366dc7ed9128d62930c2339983298cd3cf67c51b0b144d8c3a9fe77a763f852ad43842ac88e59eacdd59a9ff7459dea919
|
7
|
+
data.tar.gz: '09b998963d29d63be072ac8460ef824c72e964486713b441f330302b3623544c6320979beb3adab61d5a352d16af94ab28e88c6598a2531d3249bb39c4f66077'
|
@@ -18,6 +18,14 @@ describe Unidom::Authorization::Authorizing, type: :model do
|
|
18
18
|
|
19
19
|
it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
|
20
20
|
|
21
|
+
#it_behaves_like 'belongs_to', model_attributes, :permission, Unidom::Authorization::Permission, { name: 'User Management', path: 'administration/users'}
|
22
|
+
|
23
|
+
it_behaves_like 'scope', :permission_is, [
|
24
|
+
{ attributes_collection: [ model_attributes ], count_diff: 1, args: [ model_attributes[:permission_id] ] },
|
25
|
+
{ attributes_collection: [ model_attributes ], count_diff: 1, args: [ Unidom::Authorization::Permission.new(id: model_attributes[:permission_id]) ] },
|
26
|
+
{ attributes_collection: [ model_attributes ], count_diff: 0, args: [ model_attributes[:authorized_id] ] },
|
27
|
+
{ attributes_collection: [ model_attributes ], count_diff: 0, args: [ Unidom::Authorization::Permission.new(id: model_attributes[:authorized_id]) ] } ]
|
28
|
+
|
21
29
|
end
|
22
30
|
|
23
31
|
end
|
@@ -15,6 +15,11 @@ describe Unidom::Authorization::Permission, type: :model do
|
|
15
15
|
|
16
16
|
it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
|
17
17
|
|
18
|
+
it_behaves_like 'scope', :path_is, [
|
19
|
+
{ attributes_collection: [ model_attributes ], count_diff: 1, args: [ model_attributes[:path] ] },
|
20
|
+
{ attributes_collection: [ model_attributes ], count_diff: 0, args: [ "/#{model_attributes[:path]}" ] },
|
21
|
+
{ attributes_collection: [ model_attributes ], count_diff: 0, args: [ "#{model_attributes[:path]}.html" ] } ]
|
22
|
+
|
18
23
|
end
|
19
24
|
|
20
25
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unidom-authorization
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Topbit Du
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-common
|