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.
@@ -1,7 +1,7 @@
1
1
  module Hydra
2
2
  module Access
3
3
  module Controls
4
- VERSION = "0.0.3"
4
+ VERSION = "0.0.4"
5
5
  end
6
6
  end
7
7
  end
data/lib/hydra/ability.rb CHANGED
@@ -5,7 +5,7 @@ module Hydra::Ability
5
5
  include Hydra::AccessControlsEnforcement
6
6
 
7
7
  def initialize(user, session=nil)
8
- user ||= User.new # guest user (not logged in)
8
+ user ||= ::User.new # guest user (not logged in)
9
9
  hydra_default_permissions(user, session)
10
10
  end
11
11
 
@@ -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.3
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-09 00:00:00.000000000 Z
14
+ date: 2012-07-12 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport