mikldt-authenticates_access 0.1.1 → 0.1.2
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 +1 -1
- data/lib/authenticates_access.rb +3 -2
- data/mikldt-authenticates_access.gemspec +2 -2
- metadata +2 -2
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.2
|
data/lib/authenticates_access.rb
CHANGED
|
@@ -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
|
-
|
|
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.
|
|
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-
|
|
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.
|
|
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-
|
|
12
|
+
date: 2010-01-25 00:00:00 -05:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies: []
|
|
15
15
|
|