role_authorization 0.2.2 → 0.2.3

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.
@@ -4,7 +4,7 @@ module RoleAuthorization
4
4
  attr_accessor :global_roles, :object_roles
5
5
  attr_accessor :group_definitions, :groups
6
6
  attr_accessor :nicknames, :creations
7
- attr_accessor :klass
7
+ attr_accessor :klass, :user_klass
8
8
 
9
9
  def initialize
10
10
  @global_roles = {}
@@ -21,9 +21,9 @@ module RoleAuthorization
21
21
 
22
22
  def users(scope = nil)
23
23
  if user_ids.is_a?(Hash)
24
- User.where(:id => user_ids[scope_with(scope)])
24
+ RoleAuthorization::Roles.manager.user_klass.where(:id => user_ids[scope_with(scope)])
25
25
  else
26
- User.where(:id => user_ids)
26
+ RoleAuthorization::Roles.manager.user_klass.where(:id => user_ids)
27
27
  end
28
28
  end
29
29
 
@@ -7,6 +7,8 @@ module RoleAuthorization
7
7
  base.class_eval do
8
8
  serialize :serialized_roles
9
9
  end
10
+
11
+ RoleAuthorization::Roles.manager.user_klass = base
10
12
  end
11
13
 
12
14
  module ClassMethods
@@ -1,3 +1,3 @@
1
1
  module RoleAuthorization
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: role_authorization
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.2
5
+ version: 0.2.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - John 'asceth' Long