stonewall 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/stonewall/stonewall.rb +10 -0
  3. metadata +34 -17
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -33,5 +33,15 @@ module StoneWall
33
33
  def send?(method, user = User.current)
34
34
  self.class.stonewall.allowed?(self, user, method)
35
35
  end
36
+ alias_method :allowed?, :send?
37
+
38
+ def send_method_group?(group_name, user = User.current)
39
+ self.class.stonewall.method_groups[group_name].each do |method|
40
+ return false unless self.send?(method, user)
41
+ end
42
+ return true
43
+ end
44
+ alias_method :allowed_method_group?, :send_method_group?
45
+
36
46
  end
37
47
  end
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stonewall
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 1
8
+ - 1
9
+ version: 0.1.1
5
10
  platform: ruby
6
11
  authors:
7
12
  - bokmann
@@ -9,39 +14,49 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-03-25 00:00:00 -04:00
17
+ date: 2010-04-14 00:00:00 -04:00
13
18
  default_executable:
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: activerecord
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
20
24
  requirements:
21
25
  - - ">="
22
26
  - !ruby/object:Gem::Version
27
+ segments:
28
+ - 2
29
+ - 0
30
+ - 0
23
31
  version: 2.0.0
24
- version:
32
+ type: :runtime
33
+ version_requirements: *id001
25
34
  - !ruby/object:Gem::Dependency
26
35
  name: sentient_user
27
- type: :runtime
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
30
38
  requirements:
31
39
  - - ">="
32
40
  - !ruby/object:Gem::Version
41
+ segments:
42
+ - 0
43
+ - 1
44
+ - 0
33
45
  version: 0.1.0
34
- version:
46
+ type: :runtime
47
+ version_requirements: *id002
35
48
  - !ruby/object:Gem::Dependency
36
49
  name: thoughtbot-shoulda
37
- type: :development
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
50
+ prerelease: false
51
+ requirement: &id003 !ruby/object:Gem::Requirement
40
52
  requirements:
41
53
  - - ">="
42
54
  - !ruby/object:Gem::Version
55
+ segments:
56
+ - 0
43
57
  version: "0"
44
- version:
58
+ type: :development
59
+ version_requirements: *id003
45
60
  description: The acl from StoneWall, now as a shiny new gem!
46
61
  email: dbock@codesherpas.com
47
62
  executables: []
@@ -81,18 +96,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
81
96
  requirements:
82
97
  - - ">="
83
98
  - !ruby/object:Gem::Version
99
+ segments:
100
+ - 0
84
101
  version: "0"
85
- version:
86
102
  required_rubygems_version: !ruby/object:Gem::Requirement
87
103
  requirements:
88
104
  - - ">="
89
105
  - !ruby/object:Gem::Version
106
+ segments:
107
+ - 0
90
108
  version: "0"
91
- version:
92
109
  requirements: []
93
110
 
94
111
  rubyforge_project:
95
- rubygems_version: 1.3.5
112
+ rubygems_version: 1.3.6
96
113
  signing_key:
97
114
  specification_version: 3
98
115
  summary: extracting the acl constructs from stonepath