just_auth_me 0.0.2alpha → 0.0.3alpha

Sign up to get free protection for your applications and to get access to all the features.
@@ -40,9 +40,9 @@ module JustAuthMe
40
40
  # Authorize resource
41
41
  raise JustAuthMe::AnauthorizedAccess unless current_user
42
42
 
43
- if (params[:action] != 'index' and
44
- params[:action] != 'create' and
45
- params[:action] != 'new' and
43
+ if ((params[:action] != 'index' or options[:through]) and
44
+ (params[:action] != 'create' or options[:through]) and
45
+ (params[:action] != 'new' or options[:through]) and
46
46
  instance_variable_defined?(auth_object))
47
47
 
48
48
  raise JustAuthMe::AnauthorizedAccess unless current_user.id == instance_variable_get(auth_object).user_id
@@ -1,3 +1,3 @@
1
1
  module JustAuthMe
2
- VERSION = "0.0.2alpha"
2
+ VERSION = "0.0.3alpha"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: just_auth_me
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2alpha
4
+ version: 0.0.3alpha
5
5
  prerelease: 5
6
6
  platform: ruby
7
7
  authors: