hydra-access-controls 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
data/lib/hydra/ability.rb
CHANGED
@@ -13,9 +13,9 @@ module Hydra::RoleMapperBehavior
|
|
13
13
|
# If you pass in a nil User object (ie. user isn't logged in), or a uid that doesn't exist, it will return an empty array
|
14
14
|
def roles(user_or_uid)
|
15
15
|
if user_or_uid.kind_of?(String)
|
16
|
-
user = User.find_by_user_key(user_or_uid)
|
16
|
+
user = ::User.find_by_user_key(user_or_uid)
|
17
17
|
user_id = user_or_uid
|
18
|
-
elsif user_or_uid.kind_of?(User) && !user_or_uid.uid.nil?
|
18
|
+
elsif user_or_uid.kind_of?(::User) && !user_or_uid.uid.nil?
|
19
19
|
user = user_or_uid
|
20
20
|
user_id = user.user_key
|
21
21
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hydra-access-controls
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-07-
|
14
|
+
date: 2012-07-12 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activesupport
|