mikldt-authenticates_access 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -283,7 +283,8 @@ module AuthenticatesAccess
283
283
 
284
284
  # before_save/before_destroy hook installed by authenticates_saves
285
285
  def auth_create_filter
286
- if not self.class.allowed_to_create
286
+ @bypass_auth ||= false
287
+ if not (self.class.allowed_to_create || @bypass_auth)
287
288
  false
288
289
  else
289
290
  true
@@ -292,7 +293,7 @@ module AuthenticatesAccess
292
293
  # Included for completeness, this could be used to filter out accessors
293
294
  # who can't read an object. Sadly, there's no way to install this, yet.
294
295
  def auth_read_filter
295
- if not allowed_to_read
296
+ if not (allowed_to_read || @bypass_auth)
296
297
  false
297
298
  else
298
299
  true
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{mikldt-authenticates_access}
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
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"]
12
- s.date = %q{2010-01-24}
12
+ s.date = %q{2010-01-25}
13
13
  s.description = %q{Model-based read and write user authorization in Rails}
14
14
  s.email = %q{mikldt@gmail.com}
15
15
  s.extra_rdoc_files = [
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.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael DiTore
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-24 00:00:00 -05:00
12
+ date: 2010-01-25 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies: []
15
15