Adman65-AccessControl 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/AccessControl.gemspec +7 -7
- data/README.markdown +2 -2
- data/VERSION +1 -1
- data/generators/access_control/access_control_generator.rb +1 -1
- metadata +5 -5
data/AccessControl.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{AccessControl}
|
5
|
-
s.version = "0.2.
|
5
|
+
s.version = "0.2.6"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Adam Hawkins"]
|
9
|
-
s.date = %q{2009-07-
|
9
|
+
s.date = %q{2009-07-12}
|
10
10
|
s.description = %q{Simple role based authorization for rails}
|
11
11
|
s.email = %q{Adman1965@gmail.com}
|
12
12
|
s.extra_rdoc_files = [
|
@@ -48,13 +48,13 @@ Gem::Specification.new do |s|
|
|
48
48
|
s.rubygems_version = %q{1.3.4}
|
49
49
|
s.summary = %q{Simple role based authorization for rails}
|
50
50
|
s.test_files = [
|
51
|
-
"spec/
|
52
|
-
"spec/support/access_control_user.rb",
|
53
|
-
"spec/support/authorizable.rb",
|
54
|
-
"spec/support/schema.rb",
|
51
|
+
"spec/access_controlled_user_spec.rb",
|
55
52
|
"spec/models/permission_spec.rb",
|
56
53
|
"spec/models/role_spec.rb",
|
57
|
-
"spec/
|
54
|
+
"spec/spec_helper.rb",
|
55
|
+
"spec/support/access_control_user.rb",
|
56
|
+
"spec/support/authorizable.rb",
|
57
|
+
"spec/support/schema.rb"
|
58
58
|
]
|
59
59
|
|
60
60
|
if s.respond_to? :specification_version then
|
data/README.markdown
CHANGED
@@ -100,7 +100,7 @@ User Methods:
|
|
100
100
|
User#plays(role)
|
101
101
|
User#does_not_play?(role)
|
102
102
|
User#does_not_play(role)
|
103
|
-
User
|
104
|
-
|
103
|
+
User#roles (and all other has_and_belongs_to_many methods)
|
104
|
+
User#has_any_permissions? (useful to see if you should allow someone into an admin area)
|
105
105
|
|
106
106
|
Copyright (c) 2009 Adam Hawkins, released under the MIT license
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.6
|
@@ -41,7 +41,7 @@ class AccessControlGenerator < Rails::Generator::NamedBase
|
|
41
41
|
assigns = {}
|
42
42
|
assigns[:migration_action] = "add"
|
43
43
|
assigns[:class_name] = "create_multiple_permissions_#{@permission_names.join('_').underscore}".camelize if @permission_names
|
44
|
-
assigns[:class_name] = "
|
44
|
+
assigns[:class_name] = "create_permission_#{@permission_name}" if @permission_name
|
45
45
|
assigns[:table_name] = "permissions"
|
46
46
|
assigns[:attributes] = @permission_names.map {|name| Rails::Generator::GeneratedAttribute.new(name, "boolean")}
|
47
47
|
assigns
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: Adman65-AccessControl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Hawkins
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-07-
|
12
|
+
date: 2009-07-12 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -77,10 +77,10 @@ signing_key:
|
|
77
77
|
specification_version: 3
|
78
78
|
summary: Simple role based authorization for rails
|
79
79
|
test_files:
|
80
|
+
- spec/access_controlled_user_spec.rb
|
81
|
+
- spec/models/permission_spec.rb
|
82
|
+
- spec/models/role_spec.rb
|
80
83
|
- spec/spec_helper.rb
|
81
84
|
- spec/support/access_control_user.rb
|
82
85
|
- spec/support/authorizable.rb
|
83
86
|
- spec/support/schema.rb
|
84
|
-
- spec/models/permission_spec.rb
|
85
|
-
- spec/models/role_spec.rb
|
86
|
-
- spec/access_controlled_user_spec.rb
|