cbac 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. data/Manifest +44 -0
  2. data/README.rdoc +48 -0
  3. data/Rakefile +36 -0
  4. data/cbac.gemspec +31 -0
  5. data/generators/cbac/USAGE +34 -0
  6. data/generators/cbac/cbac_generator.rb +45 -0
  7. data/generators/cbac/templates/config/context_roles.rb +10 -0
  8. data/generators/cbac/templates/config/privileges.rb +30 -0
  9. data/generators/cbac/templates/controllers/generic_roles_controller.rb +30 -0
  10. data/generators/cbac/templates/controllers/memberships_controller.rb +22 -0
  11. data/generators/cbac/templates/controllers/permissions_controller.rb +42 -0
  12. data/generators/cbac/templates/fixtures/cbac_generic_roles.yml +9 -0
  13. data/generators/cbac/templates/fixtures/cbac_memberships.yml +8 -0
  14. data/generators/cbac/templates/fixtures/cbac_permissions.yml +8 -0
  15. data/generators/cbac/templates/migrate/create_cbac.rb +40 -0
  16. data/generators/cbac/templates/stylesheets/cbac.css +65 -0
  17. data/generators/cbac/templates/views/generic_roles/index.html.erb +59 -0
  18. data/generators/cbac/templates/views/layouts/cbac.html.erb +17 -0
  19. data/generators/cbac/templates/views/memberships/_update.html.erb +12 -0
  20. data/generators/cbac/templates/views/memberships/index.html.erb +22 -0
  21. data/generators/cbac/templates/views/permissions/_update_context_role.html.erb +12 -0
  22. data/generators/cbac/templates/views/permissions/_update_generic_role.html.erb +12 -0
  23. data/generators/cbac/templates/views/permissions/index.html.erb +31 -0
  24. data/init.rb +11 -0
  25. data/lib/cbac.rb +104 -0
  26. data/lib/cbac/config.rb +10 -0
  27. data/lib/cbac/context_role.rb +27 -0
  28. data/lib/cbac/generic_role.rb +6 -0
  29. data/lib/cbac/membership.rb +4 -0
  30. data/lib/cbac/permission.rb +6 -0
  31. data/lib/cbac/privilege.rb +72 -0
  32. data/lib/cbac/privilege_set.rb +28 -0
  33. data/lib/cbac/privilege_set_record.rb +5 -0
  34. data/lib/cbac/setup.rb +31 -0
  35. data/tasks/cbac.rake +19 -0
  36. data/test/fixtures/cbac_generic_roles.yml +9 -0
  37. data/test/fixtures/cbac_memberships.yml +8 -0
  38. data/test/fixtures/cbac_permissions.yml +15 -0
  39. data/test/fixtures/cbac_privilege_set.yml +18 -0
  40. data/test/test_cbac_authorize_context_roles.rb +43 -0
  41. data/test/test_cbac_authorize_generic_roles.rb +37 -0
  42. data/test/test_cbac_context_role.rb +51 -0
  43. data/test/test_cbac_privilege.rb +99 -0
  44. data/test/test_cbac_privilege_set.rb +52 -0
  45. metadata +118 -0
@@ -0,0 +1,28 @@
1
+ # Defines sets of privileges
2
+ #
3
+ # To create a new set: PrivilegeSet.add :set_name, "Some comment on what this
4
+ # set does"
5
+ #
6
+ # To retrieve a privilegeset, use the sets attribute. This is a Hash containing
7
+ # PrivilegeSetRecords. Usage: PrivilegeSet.sets(:set_name). If the PrivilegeSet
8
+ # already exists, an ArgumentError is thrown stating the set was already
9
+ # defined.
10
+ class Cbac::PrivilegeSet
11
+ class << self
12
+ # Hash containing all the PrivilegeSetRecords
13
+ attr_reader :sets
14
+
15
+ # Create a new PrivilegeSet
16
+ def add(symbol, comment)
17
+ # initialize variables (if applicable)
18
+ @sets = Hash.new if @sets.nil?
19
+ # check for double creation
20
+ raise ArgumentError, "CBAC: PrivilegeSet was already defined: #{symbol.to_s}" if @sets.include?(symbol)
21
+ # Create record if privilegeset doesn't exist
22
+ Cbac::PrivilegeSetRecord.create(:name => symbol.to_s) if Cbac::PrivilegeSetRecord.find(:first, :conditions => ["name = ?", symbol.to_s]).nil?
23
+ record = Cbac::PrivilegeSetRecord.find(:first, :conditions => ["name = ?", symbol.to_s])
24
+ record.comment = comment
25
+ @sets[symbol] = record
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,5 @@
1
+ class Cbac::PrivilegeSetRecord < ActiveRecord::Base
2
+ set_table_name "cbac_privilege_set"
3
+
4
+ attr_accessor :comment
5
+ end
@@ -0,0 +1,31 @@
1
+ module Cbac
2
+ # Class performs various functions specific to the CBAC system itself. Most
3
+ # important function is to check if the system is initialized; without proper
4
+ # initialization, the bootstrapper will crash.
5
+ class Setup
6
+ class << self
7
+
8
+ # Check to see if the tables are correctly migrated. If the tables are not
9
+ # migrated, CBAC should terminate immediately.
10
+ def check_tables
11
+ return false unless Cbac::PrivilegeSetRecord.table_exists?
12
+ return false unless Cbac::GenericRole.table_exists?
13
+ return false unless Cbac::Membership.table_exists?
14
+ return false unless Cbac::Permission.table_exists?
15
+ true
16
+ end
17
+
18
+ # Checks if the system is properly setup. This method is used by the
19
+ # bootstrapper to see if the system should be initialized. If the system
20
+ # is not properly setup, the bootstrapper will crash. Checks are performed
21
+ # to see if all the tables exists.
22
+ def check
23
+ if check_tables == false
24
+ puts "CBAC: not properly initialized: one or more tables are missing. Did you install it correctly? (run generate)"
25
+ return false
26
+ end
27
+ true
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,19 @@
1
+ # This rakefile contains the rake tasks for CBAC
2
+ #
3
+ # CBAC is context based access control. It enables an application to
4
+ #
5
+ #
6
+ # cbac:setup
7
+ # cbac:check
8
+ #
9
+ # 2009-11-27 Bert Meerman First version
10
+ #
11
+ namespace :cbac do
12
+ namespace :check do
13
+ desc "Checks all the available controller methods for missing privileges"
14
+ task :mapping do
15
+ load_controller_methods
16
+ puts "lala"
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,9 @@
1
+ ###
2
+ # Context
3
+ ## YAML template for the generic roles
4
+
5
+ one:
6
+ id: 1
7
+ name: administrators
8
+ remarks: Administrators role. Grants full access to the entire system.
9
+
@@ -0,0 +1,8 @@
1
+ ###
2
+ # Context
3
+ ## YAML template for the memberships
4
+
5
+ # Making the first user member of the administrator group
6
+ one:
7
+ user_id: 1
8
+ generic_role_id: 1
@@ -0,0 +1,15 @@
1
+ ###
2
+ # Context
3
+ ## YAML template for the permissions
4
+ #role_id: GenericRole.get_id :authorize_context_role
5
+
6
+ # used by test_cbac_authorize_context_roles
7
+ one:
8
+ context_role: authorize_context_role
9
+ privilege_set_id: 2
10
+
11
+ # used by test_cbac_authorize_generic_roles
12
+ two:
13
+ generic_role_id: 1
14
+ privilege_set_id: 3
15
+
@@ -0,0 +1,18 @@
1
+ ###
2
+ # YAML template for the PrivilegeSets
3
+ #
4
+
5
+ # Privilegeset
6
+ one:
7
+ id: 1
8
+ name: existing_privilege_set
9
+
10
+ # Used by the test_cbac_authorize_context_roles
11
+ two:
12
+ id: 2
13
+ name: cbac_context_role
14
+
15
+ # Used by the test_cbac_authorize_generic_roles
16
+ three:
17
+ id: 3
18
+ name: cbac_generic_role
@@ -0,0 +1,43 @@
1
+ require File.expand_path(File.join(File.dirname(__FILE__), '../../../../test/test_helper'))
2
+ require 'test/unit'
3
+ require 'rubygems'
4
+
5
+ # Dummy code for overriding the default current_user behavior
6
+ module Cbac
7
+ def current_user
8
+ 1
9
+ end
10
+ end
11
+
12
+ ###
13
+ # Tests the Cbac system for authorization with context roles
14
+ #
15
+ class CbacAuthorizeContextRolesTest < ActiveSupport::TestCase
16
+ include Cbac
17
+
18
+ self.fixture_path = File.join(File.dirname(__FILE__), "fixtures")
19
+ fixtures :all
20
+ attr_accessor :authorize_context_eval_string
21
+
22
+ # Setup defines the PrivilegeSet that is being used by all PrivilegeTest methods
23
+ def setup
24
+ return if PrivilegeSet.sets.include?(:cbac_context_role)
25
+ PrivilegeSet.add :cbac_context_role, ""
26
+ Privilege.resource :cbac_context_role, "authorize/context/roles", :get
27
+ ContextRole.add :authorize_context_role, "context.authorize_context_eval_string"
28
+ end
29
+
30
+ # Check to see if action is correctly authorized
31
+ def test_authorize_ok
32
+ self.authorize_context_eval_string = true
33
+ assert_equal true, authorization_check("authorize/context", "roles", :get, self)
34
+ end
35
+
36
+ # Run authorization with incorrect authorization
37
+ def test_authorize_incorrect_privilege
38
+ self.authorize_context_eval_string = false
39
+ # ContextRole.roles[:authorize_context_role] = "false"
40
+ assert_equal false, authorization_check("authorize/context", "roles", :get, self)
41
+ # ContextRole.roles[:authorize_context_role] = "true"
42
+ end
43
+ end
@@ -0,0 +1,37 @@
1
+ require File.expand_path(File.join(File.dirname(__FILE__), '../../../../test/test_helper'))
2
+ require 'test/unit'
3
+ require 'rubygems'
4
+
5
+ # Dummy code for overriding the default current_user behavior
6
+ module Cbac
7
+ def current_user
8
+ 1
9
+ end
10
+ end
11
+
12
+ ###
13
+ # Tests the Cbac system for authorization with generic roles
14
+ #
15
+ class CbacAuthorizeGenericRolesTest < ActiveSupport::TestCase
16
+ self.fixture_path = File.join(File.dirname(__FILE__), "fixtures")
17
+ fixtures :all
18
+
19
+ # Setup defines the PrivilegeSet that is being used by all PrivilegeTest methods
20
+ def setup
21
+ return if PrivilegeSet.sets.include?(:cbac_generic_role)
22
+ PrivilegeSet.add :cbac_generic_role, ""
23
+ PrivilegeSet.add :cbac_generic_role_incorrect, ""
24
+ Privilege.resource :cbac_generic_role, "authorize/generic/roles", :get
25
+ Privilege.resource :cbac_generic_role_incorrect, "authorize/generic/roles_incorrect", :get
26
+ end
27
+
28
+ # Check to see if action is correctly authorized
29
+ def test_authorize_ok
30
+ assert_equal true, authorization_check("authorize/generic", "roles", :get)
31
+ end
32
+
33
+ # Run authorization with incorrect authorization
34
+ def test_authorize_incorrect_privilege
35
+ assert_equal false, authorization_check("authorize/generic", "roles_incorrect", :get)
36
+ end
37
+ end
@@ -0,0 +1,51 @@
1
+ require File.expand_path(File.join(File.dirname(__FILE__), '../../../../test/test_helper'))
2
+ require 'test/unit'
3
+ require 'rubygems'
4
+
5
+ # ### Tests the Cbac::ContextRole class
6
+ #
7
+ class CbacContextRoleTest < ActiveSupport::TestCase
8
+ # Adds a new context role This test should add a new ContextRole and
9
+ # everything should be working.
10
+ def test_adding_new_context_role_by_string
11
+ eval_string = "true"
12
+ assert_difference("ContextRole.roles.length", 1, "Failed to add new ContextRole") do
13
+ ContextRole.add :test_adding_new_context_role_by_string, eval_string
14
+ end
15
+ assert_equal(true, ContextRole.roles.keys.include?(:test_adding_new_context_role_by_string), "ContextRole symbol not found.")
16
+ result = ContextRole.roles[:test_adding_new_context_role_by_string].call(nil)
17
+ assert_equal(true, result, "Incorrect eval string.")
18
+ eval_string = "false"
19
+ assert_difference("ContextRole.roles.length", 1, "Failed to add new ContextRole") do
20
+ ContextRole.add :test_adding_new_context_role_by_string2, eval_string
21
+ end
22
+ assert_equal(true, ContextRole.roles.keys.include?(:test_adding_new_context_role_by_string2), "ContextRole symbol not found.")
23
+ result = ContextRole.roles[:test_adding_new_context_role_by_string2].call(nil)
24
+ assert_equal(false, result, "Incorrect eval string.")
25
+ end
26
+
27
+ # Adds a new context role This test should add a new ContextRole and
28
+ # everything should be working.
29
+ def test_adding_new_context_role_by_block_statement
30
+ assert_difference("ContextRole.roles.length", 1, "Failed to add new ContextRole") do
31
+ ContextRole.add :test_adding_new_context_role_by_block_stmt do
32
+ @test = 2
33
+ true
34
+ end
35
+ end
36
+ assert_equal(true, ContextRole.roles.keys.include?(:test_adding_new_context_role_by_block_stmt), "ContextRole symbol not found.")
37
+ @test = 0
38
+ ContextRole.roles[:test_adding_new_context_role_by_block_stmt].call
39
+ assert_equal(2, @test, "Incorrect eval string.")
40
+ end
41
+
42
+ # When adding an already existing ContextRole, an ArgumentError should be
43
+ # raised. ContextRoles can only be declared once.
44
+ def test_adding_double_context_roles
45
+ ContextRole.add :test_adding_double_context_roles, ""
46
+ assert_raise(ArgumentError) do
47
+ ContextRole.add :test_adding_double_context_roles, ""
48
+ end
49
+ end
50
+
51
+ end
@@ -0,0 +1,99 @@
1
+ require File.expand_path(File.join(File.dirname(__FILE__), '../../../../test/test_helper'))
2
+ require 'test/unit'
3
+ require 'rubygems'
4
+
5
+ # ### Tests the Cbac::Privilege class
6
+ #
7
+ class CbacPrivilegeTest < ActiveSupport::TestCase
8
+ # Setup defines the PrivilegeSet that is being used by all PrivilegeTest
9
+ # methods
10
+ def setup
11
+ PrivilegeSet.add :cbac_privilege, "" unless PrivilegeSet.sets.include?(:cbac_privilege)
12
+ end
13
+
14
+ # Test adding get and post resources It is possible to add a resource using
15
+ # different names for actions. This method also checks if these aliases are
16
+ # all operating well.
17
+ def test_add_resources
18
+ assert_difference("Privilege.get_resources.length", 4, "GET resource was not added.") do
19
+ Privilege.resource :cbac_privilege, "add/resources/get/1", :GET
20
+ Privilege.resource :cbac_privilege, "add/resources/get/2", :get
21
+ Privilege.resource :cbac_privilege, "add/resources/get/3", :g
22
+ Privilege.resource :cbac_privilege, "add/resources/get/4", :idempotent
23
+ end
24
+ assert_difference("Privilege.post_resources.length", 3, "POST resource was not added.") do
25
+ Privilege.resource :cbac_privilege, "add/resources/post/1", :POST
26
+ Privilege.resource :cbac_privilege, "add/resources/post/2", :post
27
+ Privilege.resource :cbac_privilege, "add/resources/post/3", :p
28
+ end
29
+ end
30
+
31
+ # If an invalid action is specified, the method must raise an ArgumentError
32
+ # exception.
33
+ def test_add_incorrect_action
34
+ assert_raise(ArgumentError) do
35
+ Privilege.resource :cbac_privilege, "add/incorrect/action", :error
36
+ end
37
+ end
38
+
39
+ # If a privilege is added to a non existing PrivilegeSet, an ArgumentError
40
+ # exception must occur.
41
+ def test_add_resource_to_invalid_privilege_set
42
+ assert_raise(ArgumentError) do
43
+ Privilege.resource :cbac_privilege_error, "add/resource/to/invalid/privilege/set", :get
44
+ end
45
+ end
46
+
47
+ # Test the Privilege.select method. This method accepts a controller method
48
+ # string and an action type It returns the privilegesets that comply with this
49
+ # combination The actions post, put and delete are identical. This test aims
50
+ # at testing this assumption.
51
+ def test_select_correct
52
+ Privilege.resource :cbac_privilege, "select/correct/get", :get
53
+ Privilege.resource :cbac_privilege, "select/correct/post", :post
54
+ Privilege.resource :cbac_privilege, "select/correct/put", :post
55
+ Privilege.resource :cbac_privilege, "select/correct/delete", :post
56
+ assert_equal 1, Privilege.select("select/correct/get", :get).length
57
+ [:post, :put, :delete].each do |action|
58
+ assert_equal 1, Privilege.select("select/correct/post", action).length
59
+ assert_equal 1, Privilege.select("select/correct/put", action).length
60
+ assert_equal 1, Privilege.select("select/correct/delete", action).length
61
+ end
62
+ end
63
+
64
+ def test_exception()
65
+ begin
66
+ yield
67
+ rescue Exception => e
68
+ return e.message
69
+ end
70
+ raise "No exception was thrown"
71
+ end
72
+
73
+ # test selecting an incorrect action type
74
+ def test_select_incorrect_action_types
75
+ controller_method = "select/incorrect/action/types/get"
76
+ Privilege.resource :cbac_privilege, controller_method, :get
77
+ Privilege.select(controller_method, :get)
78
+ assert_match(/Incorrect action_type/, test_exception { Privilege.select(controller_method, :error) })
79
+ end
80
+
81
+ # If a user asks for the wrong action_type (e.g. a request is made for 'get'
82
+ # but there are only 'post' privileges or vica versa) the system will throw an
83
+ # exception as expected, but the system will also hint at the possibility of
84
+ # messing up get and post.
85
+ def test_select_the_other_action_type
86
+ controller_method = "select/the/other/action/type/get"
87
+ Privilege.resource :cbac_privilege, controller_method, :get
88
+ assert_match(/PrivilegeSets only exist for other action/, test_exception { Privilege.select(controller_method, :post) })
89
+ end
90
+
91
+ # Trying to find privileges for a set that doesn't exist, should result in an
92
+ # exception
93
+ def test_select_could_not_find_any_privilegeset
94
+ controller_method = "select/could/not/find/any/privilegeset/get"
95
+ assert_raise(RuntimeError) do
96
+ Privilege.select(controller_method, :post)
97
+ end
98
+ end
99
+ end
@@ -0,0 +1,52 @@
1
+ require File.expand_path(File.join(File.dirname(__FILE__), '../../../../test/test_helper'))
2
+ require 'test/unit'
3
+ require 'rubygems'
4
+
5
+ ###
6
+ # Tests the Cbac::PrivilegeSet class
7
+ #
8
+ class CbacPrivilegeSetTest < ActiveSupport::TestCase
9
+ self.fixture_path = File.join(File.dirname(__FILE__), "fixtures")
10
+ fixtures :all
11
+
12
+ # Adds a new privilege to the PrivilegeSet.
13
+ # This test should add a new privilege and everything should be working.
14
+ def test_adding_new_privilege_set
15
+ comment = "test_adding_new_privilege_set"
16
+ assert_difference("PrivilegeSet.sets.length", 1, "Adding test PrivilegeSet") do
17
+ PrivilegeSet.add :test_adding_new_privilege_set, comment
18
+ end
19
+ assert_equal(true, PrivilegeSet.sets.include?(:test_adding_new_privilege_set), "PrivilegeSet symbol not found.")
20
+ assert_equal(comment, PrivilegeSet.sets[:test_adding_new_privilege_set].comment, "Incorrect comment.")
21
+ end
22
+
23
+ # When adding an already existing PrivilegeSet, an ArgumentError should be raised.
24
+ # PrivilegeSets can only be declared once.
25
+ def test_adding_double_privilege_sets
26
+ PrivilegeSet.add :test_adding_double_privilege_sets, ""
27
+ assert_raise(ArgumentError) do
28
+ PrivilegeSet.add :test_adding_double_privilege_sets, ""
29
+ end
30
+ end
31
+
32
+ # This privilegeset is already in the database. The id
33
+ # should therefore be identical to the id specified in the fixture.
34
+ # Also, the number of records should not change.
35
+ def test_initializing_existing_privilege_set
36
+ assert_difference("PrivilegeSet.sets.length", 1, "Adding test PrivilegeSet") do
37
+ assert_difference("Cbac::PrivilegeSetRecord.find(:all).length", 0, "Record should have been added to table") do
38
+ PrivilegeSet.add :existing_privilege_set, "Something"
39
+ end
40
+ end
41
+ end
42
+
43
+ # This privilegeset does not yet exist. A new entry should be created
44
+ # in the database. Also, the id should not be zero.
45
+ def test_initializing_new_privilege_set
46
+ assert_difference("PrivilegeSet.sets.length", 1, "Adding test PrivilegeSet") do
47
+ assert_difference("Cbac::PrivilegeSetRecord.find(:all).length", 1, "Record should not be added to table - record already exists") do
48
+ PrivilegeSet.add :test_initializing_new_privilege_set, "Something"
49
+ end
50
+ end
51
+ end
52
+ end
metadata ADDED
@@ -0,0 +1,118 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cbac
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.1
5
+ platform: ruby
6
+ authors:
7
+ - Bert Meerman
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2010-02-05 00:00:00 +01:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description: Simple authorization system for Rails applications. Allows you to develop applications with a mixed role based authorization and a context based authorization model. Does not supply authentication.
17
+ email: b.meerman@ogd.nl
18
+ executables: []
19
+
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - README.rdoc
24
+ - lib/cbac.rb
25
+ - lib/cbac/config.rb
26
+ - lib/cbac/context_role.rb
27
+ - lib/cbac/generic_role.rb
28
+ - lib/cbac/membership.rb
29
+ - lib/cbac/permission.rb
30
+ - lib/cbac/privilege.rb
31
+ - lib/cbac/privilege_set.rb
32
+ - lib/cbac/privilege_set_record.rb
33
+ - lib/cbac/setup.rb
34
+ - tasks/cbac.rake
35
+ files:
36
+ - Manifest
37
+ - README.rdoc
38
+ - Rakefile
39
+ - cbac.gemspec
40
+ - generators/cbac/USAGE
41
+ - generators/cbac/cbac_generator.rb
42
+ - generators/cbac/templates/config/context_roles.rb
43
+ - generators/cbac/templates/config/privileges.rb
44
+ - generators/cbac/templates/controllers/generic_roles_controller.rb
45
+ - generators/cbac/templates/controllers/memberships_controller.rb
46
+ - generators/cbac/templates/controllers/permissions_controller.rb
47
+ - generators/cbac/templates/fixtures/cbac_generic_roles.yml
48
+ - generators/cbac/templates/fixtures/cbac_memberships.yml
49
+ - generators/cbac/templates/fixtures/cbac_permissions.yml
50
+ - generators/cbac/templates/migrate/create_cbac.rb
51
+ - generators/cbac/templates/stylesheets/cbac.css
52
+ - generators/cbac/templates/views/generic_roles/index.html.erb
53
+ - generators/cbac/templates/views/layouts/cbac.html.erb
54
+ - generators/cbac/templates/views/memberships/_update.html.erb
55
+ - generators/cbac/templates/views/memberships/index.html.erb
56
+ - generators/cbac/templates/views/permissions/_update_context_role.html.erb
57
+ - generators/cbac/templates/views/permissions/_update_generic_role.html.erb
58
+ - generators/cbac/templates/views/permissions/index.html.erb
59
+ - init.rb
60
+ - lib/cbac.rb
61
+ - lib/cbac/config.rb
62
+ - lib/cbac/context_role.rb
63
+ - lib/cbac/generic_role.rb
64
+ - lib/cbac/membership.rb
65
+ - lib/cbac/permission.rb
66
+ - lib/cbac/privilege.rb
67
+ - lib/cbac/privilege_set.rb
68
+ - lib/cbac/privilege_set_record.rb
69
+ - lib/cbac/setup.rb
70
+ - tasks/cbac.rake
71
+ - test/fixtures/cbac_generic_roles.yml
72
+ - test/fixtures/cbac_memberships.yml
73
+ - test/fixtures/cbac_permissions.yml
74
+ - test/fixtures/cbac_privilege_set.yml
75
+ - test/test_cbac_authorize_context_roles.rb
76
+ - test/test_cbac_authorize_generic_roles.rb
77
+ - test/test_cbac_context_role.rb
78
+ - test/test_cbac_privilege.rb
79
+ - test/test_cbac_privilege_set.rb
80
+ has_rdoc: true
81
+ homepage: http://cbac.rubyforge.org
82
+ licenses: []
83
+
84
+ post_install_message:
85
+ rdoc_options:
86
+ - --line-numbers
87
+ - --inline-source
88
+ - --title
89
+ - Cbac
90
+ - --main
91
+ - README.rdoc
92
+ require_paths:
93
+ - lib
94
+ required_ruby_version: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: "0"
99
+ version:
100
+ required_rubygems_version: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: "1.2"
105
+ version:
106
+ requirements: []
107
+
108
+ rubyforge_project: cbac
109
+ rubygems_version: 1.3.5
110
+ signing_key:
111
+ specification_version: 3
112
+ summary: CBAC - Simple authorization system for Rails applications.
113
+ test_files:
114
+ - test/test_cbac_authorize_context_roles.rb
115
+ - test/test_cbac_authorize_generic_roles.rb
116
+ - test/test_cbac_context_role.rb
117
+ - test/test_cbac_privilege.rb
118
+ - test/test_cbac_privilege_set.rb