vigilante 1.0.8 → 1.0.9

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: 3f4d3970af2c87976238d0061425596e897615a5
4
- data.tar.gz: 60f33d29fa1ec75dc4623f7309aa02d98688b546
3
+ metadata.gz: 3492684e01ee48fe7be5c1042f7c06f6a79a3c63
4
+ data.tar.gz: 67920dce5f11f2ab5d5fe321a62c3adcf966a1fd
5
5
  SHA512:
6
- metadata.gz: 3320ab2700cdd5c50bcc4edc5137e39801019a7deba041a47654f2881d22a9ede3e4ba68e82f562a43f1c1467c997f2b46ffafcf51929bc692c2eeef1d998370
7
- data.tar.gz: 642d1384d183adf44d2c8f2789e860b6434675600b3a450ffe1014e6de4cf2edb7c289eccf05bfa7616f35188205d375231a795eed568339387fc9b65283f4e5
6
+ metadata.gz: f0b8fe16ecb9819067cca4ebf434a875e6d0dd129945099cb937d869ddc5a76cca6534668aafe396b571228771eb3157cabedb54d5352dea9a62a50ebf9ea054
7
+ data.tar.gz: 24db66173f4cb3e60ec458b92f5623599ba6171598543889f8ea4acc7e19513615353c8db119cbc0c6045f0a39e164e88f8022f6cda05fff0a4cf05ac91c09e9
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.8
1
+ 1.0.9
@@ -50,7 +50,7 @@ module Vigilante
50
50
 
51
51
  @protectee ||= self.send(current_user_method) if current_user_method.present?
52
52
 
53
- Rails.logger.debug "Protectee = #{@protectee.user_name}"
53
+ Rails.logger.debug "Protectee = #{@protectee.present? ? @protectee.to_s : 'NONE'}"
54
54
 
55
55
  @protectee
56
56
  end
@@ -119,7 +119,11 @@ module Vigilante
119
119
  @permits ||= session[:permits]
120
120
  if @permits.nil?
121
121
  Rails.logger.debug "determine permissions ... "
122
- @permits = get_protectee.permits
122
+ @permits = if get_protectee
123
+ get_protectee.permits
124
+ else
125
+ PermissionHash::DEFAULT_PERMISSIONS
126
+ end
123
127
  session[:permits] = @permits
124
128
  elsif @permits.class.name != "PermissionHash"
125
129
  @permits = PermissionHash.new(@permits)
data/vigilante.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: vigilante 1.0.8 ruby lib
5
+ # stub: vigilante 1.0.9 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "vigilante"
9
- s.version = "1.0.8"
9
+ s.version = "1.0.9"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Nathan Van der Auwera"]
14
- s.date = "2015-10-21"
14
+ s.date = "2016-07-28"
15
15
  s.description = "Vigilante is a db-backed authorisation, completely configurable and dynamic; where permissions can be limited to extents."
16
16
  s.email = "nathan@dixis.com"
17
17
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vigilante
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Van der Auwera
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-21 00:00:00.000000000 Z
11
+ date: 2016-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails