cbac 0.7.0 → 0.8.0

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: 8c041fd3a4befc2208c468e57a7a6a49168d2bd5
4
- data.tar.gz: c97a35227f58f9f04083e4e88cc1bc42e26a8e2a
3
+ metadata.gz: ebd2a7ef4783d88a1196becd95291daa107e157c
4
+ data.tar.gz: ed81520c8fd1dea8a81e7320abbb1b7e3f50b08a
5
5
  SHA512:
6
- metadata.gz: 0fa615f6784d84775c61971e234ae419de6ae748ea2229b3cabfa2947c632932a488c68ee814959377cba1239289c82971d34c7aa64fbe322e2e98acecb22ff5
7
- data.tar.gz: 8d2c9e5b8aa393d896d1e4803536ddafaece144cb4fbfdaa48657eb160c5c9e2cb15b61747b49a5191353deaea469f55e251285e5033b8f854e800704d74edf2
6
+ metadata.gz: 30bb1d5bc9ba94c34d36945dafa61ec2c70aaa324602a90e3417030f99417ffd1349ae85ed80f161169049e26896e1e0a71b97153078aa52b67b4c641828f0a8
7
+ data.tar.gz: 158e70bea961396f406797ba3c8b9681621063dc69fa3c5ae61d523238c2467aa37ca150f5d3596b39e4ca7e66de1726985e2e01401410019622297cb54517ee
@@ -0,0 +1,21 @@
1
+ # The MIT License (MIT)
2
+ Copyright © 2009 Bert Meerman
3
+
4
+ * * *
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
7
+ this software and associated documentation files (the “Software”), to deal in
8
+ the Software without restriction, including without limitation the rights to
9
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
10
+ the Software, and to permit persons to whom the Software is furnished to do so,
11
+ subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
19
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,19 @@
1
+ # Context Based Access Control _(cbac)_
2
+
3
+ > Easy to use, light-weight authorization system for Rails applications.
4
+
5
+ Context Based Access Control allows you to build a Rails application with both generic roles as well as context roles. The generic role part allows an application to authorize users with a conventional role system. The context part allows an application to authorize with a combination of the user credentials and the context of the requested action.
6
+
7
+ ## Install
8
+ The gem can be installed using the 'gem' command: `gem install cbac`
9
+
10
+ Please use the correct version of _cbac_ in your `Gemfile`:
11
+ - for Rails 3 and lower: `gem 'cbac', '~> 0.6.10'`
12
+ - for Rails 4: `gem 'cbac', '~> 0.7.0'`
13
+ - for Rails 5: `gem 'cbac', '~> 0.8.0'`
14
+
15
+ ## Usage
16
+ To use the gem, see the documentation at cbac.rubyforge.org.
17
+
18
+ ## License
19
+ This project is licensed under the MIT License. See the LICENSE.md file for details.
@@ -1,34 +1,23 @@
1
- = Context Based Access Control
1
+ = Context Based Access Control (cbac)
2
2
 
3
- == DESCRIPTION:
4
- Easy to use, light-weight authorization system for Rails applications.
3
+ == Description
4
+ <em>Easy to use, light-weight authorization system for Rails applications.</em>
5
5
 
6
- == Update
7
- Version 0.7 contains several updates on the system. This is driven by the
8
- wish to be compliant with Rails 4.2, the oldest Rails version that is
9
- currently under support.
6
+ Context Based Access Control allows you to build a Rails application with both generic roles as well as context roles. The generic role part allows an application to authorize users with a conventional role system. The context part allows an application to authorize with a combination of the user credentials and the context of the requested action.
10
7
 
11
- == FEATURES:
12
- - Authorize users via roles/ groups
13
- - Authorize users via the context of their request
8
+ == Install
9
+ The gem can be installed using the 'gem' command: <code>gem install cbac</code>
14
10
 
15
- == SYNOPSIS:
16
- Context Based Access Control allows you to build a Rails application with
17
- both generic roles as well as context roles. The generic role part allows
18
- an application to authorize users with a conventional role system. The context
19
- part allows an application to authorize with a combination of the user
20
- credentials and the context of the requested action.
11
+ Please use the correct version of _cbac_ in your *Gemfile*:
12
+ * for Rails 3 and lower: <code>gem 'cbac', '~> 0.6.10'</code>
13
+ * for Rails 4: <code>gem 'cbac', '~> 0.7.0'</code>
14
+ * for Rails 5: <code>gem 'cbac', '~> 0.8.0'</code>
21
15
 
22
- == REQUIREMENTS:
16
+ == Usage
17
+ To use the gem, see the documentation at http://cbac.rubyforge.org.
23
18
 
24
- == INSTALL:
25
- The gem can be installed using the 'gem' command.
26
- gem install cbac
27
-
28
- To use the gem, see the documentation at cbac.rubyforge.org.
29
- == LICENSE:
30
-
31
- (The MIT License)
19
+ == License
20
+ This project is licensed under the MIT License:
32
21
 
33
22
  Copyright (c) 2009 Bert Meerman
34
23
 
@@ -2,10 +2,10 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "cbac"
5
- s.version = "0.7.0"
5
+ s.version = "0.8.0"
6
6
 
7
7
  s.authors = ["Bert Meerman"]
8
- s.date = "2016-08-15"
8
+ s.date = "2018-03-10"
9
9
  s.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."
10
10
  s.email = "bertm@rubyforge.org"
11
11
  s.files = `git ls-files`.split("\n")
@@ -13,15 +13,15 @@ Gem::Specification.new do |s|
13
13
  s.license = "MIT"
14
14
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Cbac", "--main", "README.rdoc"]
15
15
  s.require_paths = ["lib"]
16
- s.required_ruby_version = ">= 1.9.3"
16
+ s.required_ruby_version = ">= 2.2.2"
17
17
  s.required_rubygems_version = ">= 1.8.11"
18
18
  s.rubyforge_project = "cbac"
19
- s.summary = "CBAC - Simple authorization system for Rails applications."
19
+ s.summary = "Easy to use, light-weight authorization system for Rails applications."
20
20
  s.test_files = `git ls-files -- test/*.*`.split("\n")
21
21
 
22
22
  s.add_development_dependency("database_cleaner", "~> 1.5")
23
23
  s.add_development_dependency("rspec-rails", "~> 3")
24
24
  s.add_development_dependency("sqlite3", "~> 1.3")
25
25
  s.add_runtime_dependency("echoe", "~> 4")
26
- s.add_runtime_dependency("rails", "~> 4.2")
26
+ s.add_runtime_dependency("rails", "~> 5.0")
27
27
  end
@@ -121,13 +121,13 @@ module Cbac
121
121
  # privilege definitions
122
122
  begin
123
123
  require File.join(::Rails.root.to_s, "config", "cbac", "privileges.rb")
124
- rescue MissingSourceFile
124
+ rescue LoadError
125
125
  puts "CBAC warning: Could not load config/cbac/privileges.rb (Did you run ./script/generate cbac?)"
126
126
  end
127
127
  # Include context roles file - contains the context role definitions
128
128
  begin
129
129
  require File.join(::Rails.root.to_s, "config", "cbac", "context_roles.rb")
130
- rescue MissingSourceFile
130
+ rescue LoadError
131
131
  puts "CBAC warning: Could not load config/cbac/context_roles.rb (Did you run ./script/generate cbac?)"
132
132
  end
133
133
 
@@ -1,3 +1,3 @@
1
1
  module Cbac
2
- VERSION = '0.7.0'
2
+ VERSION = '0.8.0'
3
3
  end
@@ -1,4 +1,4 @@
1
- class CreateCbacFromScratch < ActiveRecord::Migration
1
+ class CreateCbacFromScratch < ActiveRecord::Migration[5.0]
2
2
  def self.up
3
3
  unless Cbac::Permission.table_exists?
4
4
  create_table :cbac_permissions do |t|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cbac
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bert Meerman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-15 00:00:00.000000000 Z
11
+ date: 2018-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: database_cleaner
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '4.2'
75
+ version: '5.0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '4.2'
82
+ version: '5.0'
83
83
  description: Simple authorization system for Rails applications. Allows you to develop
84
84
  applications with a mixed role based authorization and a context based authorization
85
85
  model. Does not supply authentication.
@@ -91,7 +91,9 @@ files:
91
91
  - ".gitignore"
92
92
  - ".rspec"
93
93
  - Gemfile
94
+ - LICENSE.md
94
95
  - Manifest
96
+ - README.md
95
97
  - README.rdoc
96
98
  - Rakefile
97
99
  - cbac.gemspec
@@ -181,7 +183,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
181
183
  requirements:
182
184
  - - ">="
183
185
  - !ruby/object:Gem::Version
184
- version: 1.9.3
186
+ version: 2.2.2
185
187
  required_rubygems_version: !ruby/object:Gem::Requirement
186
188
  requirements:
187
189
  - - ">="
@@ -189,10 +191,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
189
191
  version: 1.8.11
190
192
  requirements: []
191
193
  rubyforge_project: cbac
192
- rubygems_version: 2.4.8
194
+ rubygems_version: 2.6.14
193
195
  signing_key:
194
196
  specification_version: 4
195
- summary: CBAC - Simple authorization system for Rails applications.
197
+ summary: Easy to use, light-weight authorization system for Rails applications.
196
198
  test_files:
197
199
  - test/test_cbac_actions.rb
198
200
  - test/test_cbac_authorize_generic_roles.rb