role_authorization 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,10 +1,12 @@
1
1
  module RoleAuthorization
2
2
  module Roles
3
3
  class Manager
4
+ cattr_accessor :user_klass
5
+
4
6
  attr_accessor :global_roles, :object_roles
5
7
  attr_accessor :group_definitions, :groups
6
8
  attr_accessor :nicknames, :creations
7
- attr_accessor :klass, :user_klass
9
+ attr_accessor :klass
8
10
 
9
11
  def initialize
10
12
  @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
- RoleAuthorization::Roles.manager.user_klass.where(:id => user_ids[scope_with(scope)])
24
+ RoleAuthorization::Roles::Manager.user_klass.where(:id => user_ids[scope_with(scope)])
25
25
  else
26
- RoleAuthorization::Roles.manager.user_klass.where(:id => user_ids)
26
+ RoleAuthorization::Roles::Manager.user_klass.where(:id => user_ids)
27
27
  end
28
28
  end
29
29
 
@@ -8,7 +8,7 @@ module RoleAuthorization
8
8
  serialize :serialized_roles
9
9
  end
10
10
 
11
- RoleAuthorization::Roles.manager.user_klass = base
11
+ RoleAuthorization::Roles::Manager.user_klass = base
12
12
  end
13
13
 
14
14
  module ClassMethods
@@ -1,3 +1,3 @@
1
1
  module RoleAuthorization
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
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.3
5
+ version: 0.2.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - John 'asceth' Long