lipsiadmin 5.0.0 → 5.0.1
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/CHANGELOG +3 -0
- data/lib/access_control/base.rb +3 -3
- data/lib/version.rb +1 -1
- metadata +2 -2
data/CHANGELOG
CHANGED
data/lib/access_control/base.rb
CHANGED
@@ -80,9 +80,9 @@ module Lipsiadmin
|
|
80
80
|
@allowed = []
|
81
81
|
@denied = []
|
82
82
|
@roles = roles
|
83
|
-
@
|
83
|
+
@account_id = account.is_a?(Account) ? account.id : account
|
84
84
|
# Mantain backward compatibility
|
85
|
-
yield(self, @
|
85
|
+
yield(self, Account.find(@account_id)) rescue yield(self)
|
86
86
|
end
|
87
87
|
|
88
88
|
# Create a new project module
|
@@ -112,7 +112,7 @@ module Lipsiadmin
|
|
112
112
|
|
113
113
|
# Return true if current_account role is included in given roles
|
114
114
|
def allowed?
|
115
|
-
@roles.any? { |r| r.to_s.downcase == @
|
115
|
+
@roles.any? { |r| r.to_s.downcase == Account.find(@account_id).role.downcase }
|
116
116
|
end
|
117
117
|
|
118
118
|
# Return allowed actions/controllers
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lipsiadmin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Davide D'Agostino
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-07-
|
12
|
+
date: 2009-07-18 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|