arsecurity 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/CHANGELOG +3 -0
  2. data/Rakefile +1 -1
  3. data/lib/arsecurity_util.rb +2 -2
  4. metadata +2 -2
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ Changes in version 0.1.3 (2009-06-15)
2
+ fix bug, allow all operation when permission operation is not only nil but also blank
3
+
1
4
  Changes in version 0.1.2 (2009-05-05)
2
5
  fix bug, remove wrong '=' when rebuild conditions
3
6
 
data/Rakefile CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'rubygems'
2
2
  require 'rake/gempackagetask'
3
3
  PKG_NAME = "arsecurity"
4
- PKG_VERSION = "0.1.2"
4
+ PKG_VERSION = "0.1.3"
5
5
  PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
6
6
  PKG_FILES = FileList[
7
7
  '[A-Z]*',
@@ -18,7 +18,7 @@ class ArsecurityUtil
18
18
  permissions.each do |permission|
19
19
  permission = ArsecurityPermission.new(permission) if permission.is_a?(Hash)
20
20
  next if permission.target_class_name != target_class_name
21
- unless permission.operation.nil?
21
+ if permission.operation.present?
22
22
  next if permission.operation != operation
23
23
  end
24
24
  #instance not nil mean persist
@@ -66,7 +66,7 @@ class ArsecurityUtil
66
66
  def has_permission(permission, operation, target_class_name, instance)
67
67
  return false if permission.target_class_name != target_class_name
68
68
 
69
- unless permission.operation.nil?
69
+ if permission.operation.present?
70
70
  return false if permission.operation != operation
71
71
  end
72
72
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arsecurity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leon Li
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-05-06 00:00:00 +08:00
12
+ date: 2009-06-25 00:00:00 +08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency