mikldt-authenticates_access 0.1.2 → 0.2.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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.2.0
@@ -19,7 +19,6 @@ module AuthenticatesAccess
19
19
  # start out assuming we have not passed any tests
20
20
  # if one passes this gets set to true
21
21
  passed = false
22
-
23
22
  self.each do |method|
24
23
  unless targets[method.type].nil?
25
24
  target = targets[method.type]
@@ -293,7 +292,7 @@ module AuthenticatesAccess
293
292
  # Included for completeness, this could be used to filter out accessors
294
293
  # who can't read an object. Sadly, there's no way to install this, yet.
295
294
  def auth_read_filter
296
- if not (allowed_to_read || @bypass_auth)
295
+ if not (@bypass_auth || allowed_to_read)
297
296
  false
298
297
  else
299
298
  true
@@ -345,7 +344,7 @@ module AuthenticatesAccess
345
344
  # Overload of read_attribute to filter data access
346
345
  def read_attribute(name)
347
346
  @bypass_auth ||= false
348
- if allowed_to_read_from(name) || @bypass_auth
347
+ if @bypass_auth || allowed_to_read_from(name)
349
348
  super(name)
350
349
  end
351
350
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{mikldt-authenticates_access}
8
- s.version = "0.1.2"
8
+ s.version = "0.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Michael DiTore"]
@@ -44,10 +44,10 @@ Gem::Specification.new do |s|
44
44
  s.summary = %q{Model-based Authorization on Rails!}
45
45
  s.test_files = [
46
46
  "test/authenticates_access_test.rb",
47
- "test/user.rb",
48
47
  "test/test_helper.rb",
49
48
  "test/owned_item.rb",
50
- "test/admin_item.rb"
49
+ "test/admin_item.rb",
50
+ "test/user.rb"
51
51
  ]
52
52
 
53
53
  if s.respond_to? :specification_version then
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mikldt-authenticates_access
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael DiTore
@@ -72,7 +72,7 @@ specification_version: 3
72
72
  summary: Model-based Authorization on Rails!
73
73
  test_files:
74
74
  - test/authenticates_access_test.rb
75
- - test/user.rb
76
75
  - test/test_helper.rb
77
76
  - test/owned_item.rb
78
77
  - test/admin_item.rb
78
+ - test/user.rb