access_schema 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -46,12 +46,12 @@ describe AccessSchema::Schema do
|
|
46
46
|
|
47
47
|
it "raises exception on invalid feature"
|
48
48
|
|
49
|
-
it "
|
50
|
-
@schema.
|
49
|
+
it "fails if no roles and asserts are specified in privilege definition" do
|
50
|
+
@schema.should_not be_allow("Review", :view, [:user])
|
51
51
|
end
|
52
52
|
|
53
|
-
it "checks assert if no roles specified in assert definition" do
|
54
|
-
@schema.
|
53
|
+
it "does not checks assert if no roles specified in assert definition" do
|
54
|
+
@schema.should_not be_allow("Review", :echo_privilege, [:user], :result => true)
|
55
55
|
@schema.should_not be_allow("Review", :echo_privilege, [:user], :result => false)
|
56
56
|
end
|
57
57
|
|
@@ -69,6 +69,10 @@ describe AccessSchema::Schema do
|
|
69
69
|
@schema.should_not be_allow("Review", :update, [:user])
|
70
70
|
end
|
71
71
|
|
72
|
+
it "fails for role 'none'" do
|
73
|
+
@schema.should_not be_allow("Review", :update, [:none])
|
74
|
+
end
|
75
|
+
|
72
76
|
it "passes for admin and user" do
|
73
77
|
@schema.should be_allow("Review", :update, [:admin, :user])
|
74
78
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: access_schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-04-
|
12
|
+
date: 2012-04-02 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: AccessSchema is a tool for ACL or tariff plans schema definition and
|
15
15
|
checks
|
@@ -70,7 +70,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
70
70
|
version: '0'
|
71
71
|
segments:
|
72
72
|
- 0
|
73
|
-
hash: -
|
73
|
+
hash: -2599107486354606054
|
74
74
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
75
|
none: false
|
76
76
|
requirements:
|
@@ -79,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
79
79
|
version: '0'
|
80
80
|
segments:
|
81
81
|
- 0
|
82
|
-
hash: -
|
82
|
+
hash: -2599107486354606054
|
83
83
|
requirements: []
|
84
84
|
rubyforge_project: access_schema
|
85
85
|
rubygems_version: 1.8.16
|