effective_regions 1.4.2 → 1.4.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 19b5c669b24dbd40ab017485b3811663a8de73aa
4
- data.tar.gz: 4bdc14ffb69aff0ca233c12a28c7b4c7c750aa25
3
+ metadata.gz: ba332da231fdbe20fe72361c6ddbaaec95f11d2b
4
+ data.tar.gz: 558a7f5bc4f7915e37f8cf12428634613ea1d89c
5
5
  SHA512:
6
- metadata.gz: e0e7e782326af781d20f34dde6ebda482cc07486040706c8cab24fa9880883c22c89e4d77f55c351422e544290c325938a6b19e3a64cc9d1e2f358bc6c9eceac
7
- data.tar.gz: 1e23b7d6abad0479bdd28ecdc5ea6e2fe1a4d93175f13d07c76c0d2346abc03f66665e46901ee7fc77bdd759e25a334000213e18eafa5bf68b81a90bd2c11e79
6
+ metadata.gz: b27f521ef64906ecabd1f10af9cba946d9c934396eecc9a5c3e5947c425a85a3ce3db0862ce196cff3b97fdcc6448b2b174d1c5802cefb4dd89a9e82e65e5755
7
+ data.tar.gz: 401510a46e9548a74adc2124ddb8d247418565a2c4f605cfde3354edc1fd59ffb0248c25730d19d127d2e3dbdfcbbf4538474ff377aec39c25281f575e0e31f1
@@ -28,7 +28,10 @@ module EffectiveRegionsHelper
28
28
  end
29
29
 
30
30
  def effectively_editting?
31
- @effectively_editting ||= request.fullpath.include?('edit=true')
31
+ @effectively_editting ||= (
32
+ request.fullpath.include?('edit=true') &&
33
+ (EffectiveRegions.authorized?(controller, :edit, Effective::Region.new()) rescue false)
34
+ )
32
35
  end
33
36
 
34
37
  private
@@ -1,3 +1,3 @@
1
1
  module EffectiveRegions
2
- VERSION = '1.4.2'.freeze
2
+ VERSION = '1.4.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_regions
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.2
4
+ version: 1.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-12 00:00:00.000000000 Z
11
+ date: 2015-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails