portier 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/.travis.yml +5 -0
  4. data/Gemfile +4 -0
  5. data/LICENSE +7 -0
  6. data/README.md +171 -0
  7. data/Rakefile +11 -0
  8. data/lib/portier/.reek +12 -0
  9. data/lib/portier/application_permission.rb +89 -0
  10. data/lib/portier/base.rb +75 -0
  11. data/lib/portier/base_permission.rb +36 -0
  12. data/lib/portier/engine.rb +7 -0
  13. data/lib/portier/errors.rb +19 -0
  14. data/lib/portier/implants/action_controller_implant.rb +37 -0
  15. data/lib/portier/railtie.rb +14 -0
  16. data/lib/portier/view_tags_permission.rb +14 -0
  17. data/lib/portier.rb +12 -0
  18. data/portier.gemspec +22 -0
  19. data/spec/controllers/application_controller_spec.rb +81 -0
  20. data/spec/dummy/Rakefile +6 -0
  21. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  22. data/spec/dummy/app/controllers/examples_controller.rb +11 -0
  23. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  24. data/spec/dummy/app/models/anonymou.rb +19 -0
  25. data/spec/dummy/app/permissions/anonymous_permission.rb +25 -0
  26. data/spec/dummy/app/permissions/products_permission.rb +9 -0
  27. data/spec/dummy/app/permissions/view_tags_permission.rb +5 -0
  28. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  29. data/spec/dummy/bin/bundle +3 -0
  30. data/spec/dummy/bin/rails +4 -0
  31. data/spec/dummy/bin/rake +4 -0
  32. data/spec/dummy/config/application.rb +18 -0
  33. data/spec/dummy/config/boot.rb +5 -0
  34. data/spec/dummy/config/database.yml +5 -0
  35. data/spec/dummy/config/environment.rb +5 -0
  36. data/spec/dummy/config/environments/development.rb +29 -0
  37. data/spec/dummy/config/environments/production.rb +80 -0
  38. data/spec/dummy/config/environments/test.rb +36 -0
  39. data/spec/dummy/config/initializers/standard_rails_initializers.rb +9 -0
  40. data/spec/dummy/config/routes.rb +3 -0
  41. data/spec/dummy/config.ru +4 -0
  42. data/spec/dummy/db/test.sqlite3 +0 -0
  43. data/spec/portier/application_permission_spec.rb +23 -0
  44. data/spec/portier/base_permission_spec.rb +4 -0
  45. data/spec/portier/base_spec.rb +28 -0
  46. data/spec/portier/view_tags_permission_spec.rb +31 -0
  47. data/spec/portier_spec.rb +4 -0
  48. data/spec/spec_helper.rb +26 -0
  49. data/spec/support/views_helper.rb +12 -0
  50. metadata +197 -0
@@ -0,0 +1,19 @@
1
+ class Anonymou
2
+ def self.find_by(query={})
3
+ if query[:id] == 'open'
4
+ self.new(true)
5
+ elsif query[:id] == 'restricted'
6
+ self.new(false)
7
+ else
8
+ nil
9
+ end
10
+ end
11
+
12
+ def initialize(open)
13
+ @open = open
14
+ end
15
+
16
+ def open?
17
+ @open
18
+ end
19
+ end
@@ -0,0 +1,25 @@
1
+ class AnonymousPermission < Portier::ApplicationPermission
2
+ def default
3
+ false
4
+ end
5
+
6
+ def index
7
+ true
8
+ end
9
+
10
+ def create
11
+ true
12
+ end
13
+
14
+ def modify
15
+ false
16
+ end
17
+
18
+ def destroy
19
+ anonymou.open?
20
+ end
21
+
22
+ def permitted_params
23
+ [:name, :email]
24
+ end
25
+ end
@@ -0,0 +1,9 @@
1
+ class ProductsPermission < Portier::ApplicationPermission
2
+ def default
3
+ false
4
+ end
5
+
6
+ def add
7
+ true
8
+ end
9
+ end
@@ -0,0 +1,5 @@
1
+ class ViewTagsPermission < Portier::ViewTagsPermission
2
+ def granted_response
3
+ options[:show]
4
+ end
5
+ end
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
6
+ <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run
@@ -0,0 +1,18 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ # Pick the frameworks you want:
4
+ require "active_record/railtie"
5
+ require "action_controller/railtie"
6
+ require "action_mailer/railtie"
7
+ require "sprockets/railtie"
8
+ # require "rails/test_unit/railtie"
9
+
10
+ Bundler.require(*Rails.groups)
11
+
12
+ require "portier"
13
+
14
+ module Dummy
15
+ class Application < Rails::Application
16
+ end
17
+ end
18
+
@@ -0,0 +1,5 @@
1
+ # Set up gems listed in the Gemfile.
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
3
+
4
+ require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
5
+ $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
@@ -0,0 +1,5 @@
1
+ test:
2
+ adapter: sqlite3
3
+ database: db/test.sqlite3
4
+ pool: 5
5
+ timeout: 5000
@@ -0,0 +1,5 @@
1
+ # Load the rails application.
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the rails application.
5
+ Dummy::Application.initialize!
@@ -0,0 +1,29 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # In the development environment your application's code is reloaded on
5
+ # every request. This slows down response time but is perfect for development
6
+ # since you don't have to restart the web server when you make code changes.
7
+ config.cache_classes = false
8
+
9
+ # Do not eager load code on boot.
10
+ config.eager_load = false
11
+
12
+ # Show full error reports and disable caching.
13
+ config.consider_all_requests_local = true
14
+ config.action_controller.perform_caching = false
15
+
16
+ # Don't care if the mailer can't send.
17
+ config.action_mailer.raise_delivery_errors = false
18
+
19
+ # Print deprecation notices to the Rails logger.
20
+ config.active_support.deprecation = :log
21
+
22
+ # Raise an error on page load if there are pending migrations
23
+ config.active_record.migration_error = :page_load
24
+
25
+ # Debug mode disables concatenation and preprocessing of assets.
26
+ # This option may cause significant delays in view rendering with a large
27
+ # number of complex assets.
28
+ config.assets.debug = true
29
+ end
@@ -0,0 +1,80 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # Code is not reloaded between requests.
5
+ config.cache_classes = true
6
+
7
+ # Eager load code on boot. This eager loads most of Rails and
8
+ # your application in memory, allowing both thread web servers
9
+ # and those relying on copy on write to perform better.
10
+ # Rake tasks automatically ignore this option for performance.
11
+ config.eager_load = true
12
+
13
+ # Full error reports are disabled and caching is turned on.
14
+ config.consider_all_requests_local = false
15
+ config.action_controller.perform_caching = true
16
+
17
+ # Enable Rack::Cache to put a simple HTTP cache in front of your application
18
+ # Add `rack-cache` to your Gemfile before enabling this.
19
+ # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
20
+ # config.action_dispatch.rack_cache = true
21
+
22
+ # Disable Rails's static asset server (Apache or nginx will already do this).
23
+ config.serve_static_assets = false
24
+
25
+ # Compress JavaScripts and CSS.
26
+ config.assets.js_compressor = :uglifier
27
+ # config.assets.css_compressor = :sass
28
+
29
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
30
+ config.assets.compile = false
31
+
32
+ # Generate digests for assets URLs.
33
+ config.assets.digest = true
34
+
35
+ # Version of your assets, change this if you want to expire all your assets.
36
+ config.assets.version = '1.0'
37
+
38
+ # Specifies the header that your server uses for sending files.
39
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
40
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
41
+
42
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
43
+ # config.force_ssl = true
44
+
45
+ # Set to :debug to see everything in the log.
46
+ config.log_level = :info
47
+
48
+ # Prepend all log lines with the following tags.
49
+ # config.log_tags = [ :subdomain, :uuid ]
50
+
51
+ # Use a different logger for distributed setups.
52
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
53
+
54
+ # Use a different cache store in production.
55
+ # config.cache_store = :mem_cache_store
56
+
57
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
58
+ # config.action_controller.asset_host = "http://assets.example.com"
59
+
60
+ # Precompile additional assets.
61
+ # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
62
+ # config.assets.precompile += %w( search.js )
63
+
64
+ # Ignore bad email addresses and do not raise email delivery errors.
65
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
66
+ # config.action_mailer.raise_delivery_errors = false
67
+
68
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
69
+ # the I18n.default_locale when a translation can not be found).
70
+ config.i18n.fallbacks = true
71
+
72
+ # Send deprecation notices to registered listeners.
73
+ config.active_support.deprecation = :notify
74
+
75
+ # Disable automatic flushing of the log to improve performance.
76
+ # config.autoflush_log = false
77
+
78
+ # Use default logging formatter so that PID and timestamp are not suppressed.
79
+ config.log_formatter = ::Logger::Formatter.new
80
+ end
@@ -0,0 +1,36 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # The test environment is used exclusively to run your application's
5
+ # test suite. You never need to work with it otherwise. Remember that
6
+ # your test database is "scratch space" for the test suite and is wiped
7
+ # and recreated between test runs. Don't rely on the data there!
8
+ config.cache_classes = true
9
+
10
+ # Do not eager load code on boot. This avoids loading your whole application
11
+ # just for the purpose of running a single test. If you are using a tool that
12
+ # preloads Rails for running tests, you may have to set it to true.
13
+ config.eager_load = false
14
+
15
+ # Configure static asset server for tests with Cache-Control for performance.
16
+ config.serve_static_assets = true
17
+ config.static_cache_control = "public, max-age=3600"
18
+
19
+ # Show full error reports and disable caching.
20
+ config.consider_all_requests_local = true
21
+ config.action_controller.perform_caching = false
22
+
23
+ # Raise exceptions instead of rendering exception templates.
24
+ config.action_dispatch.show_exceptions = false
25
+
26
+ # Disable request forgery protection in test environment.
27
+ config.action_controller.allow_forgery_protection = false
28
+
29
+ # Tell Action Mailer not to deliver emails to the real world.
30
+ # The :test delivery method accumulates sent emails in the
31
+ # ActionMailer::Base.deliveries array.
32
+ config.action_mailer.delivery_method = :test
33
+
34
+ # Print deprecation notices to the stderr.
35
+ config.active_support.deprecation = :stderr
36
+ end
@@ -0,0 +1,9 @@
1
+ Rails.application.config.filter_parameters += [:password]
2
+
3
+ Dummy::Application.config.secret_key_base = 'ae3cad0b2a7fe9cf1620b58b362sdfsdf9d5236ba303b9821fb22ac023c9dc1b07ef16f27b74e96c4294f1e02c5bfc83f2dc89c02c9fc24d1b3974f6d7c14701'
4
+
5
+ Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
6
+
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9
+ end
@@ -0,0 +1,3 @@
1
+ Dummy::Application.routes.draw do
2
+ resources :examples
3
+ end
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Rails.application
File without changes
@@ -0,0 +1,23 @@
1
+ require 'spec_helper'
2
+
3
+ describe Portier::ApplicationPermission do
4
+ describe "#build_permitted_params" do
5
+ pending
6
+ end
7
+
8
+ describe "#can?" do
9
+ pending
10
+ end
11
+
12
+ describe "#default" do
13
+ it "should be protected by default" do
14
+ Portier::ApplicationPermission.new(double(:app), double(:user)).default.should be_false
15
+ end
16
+ end
17
+
18
+ describe "#granted?" do
19
+ pending
20
+ end
21
+ end
22
+
23
+ require 'spec_helper'
@@ -0,0 +1,4 @@
1
+ require 'spec_helper'
2
+
3
+ describe Portier::BasePermission do
4
+ end
@@ -0,0 +1,28 @@
1
+ require 'spec_helper'
2
+
3
+ describe Portier::Base do
4
+ include ViewHelpers
5
+
6
+ describe "#authorize_action" do
7
+ pending
8
+ end
9
+
10
+ describe "#can?" do
11
+ before { @app = app_mock }
12
+ context "with an unexisting permission file" do
13
+ before { @base = Portier::Base.new(@app, double(:user)) }
14
+
15
+ context "when checking if user can edit record" do
16
+ specify { expect { @base.can?(:edit, double(:user)) }.to raise_error(Portier::Uninitalized) }
17
+ end
18
+ end
19
+ end
20
+
21
+ describe "#can_view?" do
22
+ pending
23
+ end
24
+
25
+ describe "#permitted_params" do
26
+ pending
27
+ end
28
+ end
@@ -0,0 +1,31 @@
1
+ require 'spec_helper'
2
+
3
+ describe Portier::ViewTagsPermission do
4
+ describe "#can_view?" do
5
+ context "with a view_tags permission" do
6
+ before { @permission = Portier::ViewTagsPermission.new double(:app), double(:user) }
7
+
8
+ context "with the undefined tag show_admin_link" do
9
+ context "when checking if the user can view the show_admin_link" do
10
+ specify { expect { @permission.can_view?(:show_admin_link) }.to raise_error(Portier::NoPermissionError) }
11
+ end
12
+ end
13
+
14
+ context "with the tag show_admin_link restricting access to the user" do
15
+ before { @permission.stub(:show_admin_link).and_return false }
16
+
17
+ context "when checking if the user can view the show_admin_link" do
18
+ specify { @permission.can_view?(:show_admin_link).should be_false }
19
+ end
20
+ end
21
+
22
+ context "with the tag show_admin_link allowing access to the user" do
23
+ before { @permission.stub(:show_admin_link).and_return true }
24
+
25
+ context "when checking if the user can view the show_admin_link" do
26
+ specify { @permission.can_view?(:show_admin_link).should be_true }
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,4 @@
1
+ require 'spec_helper'
2
+
3
+ describe Portier do
4
+ end
@@ -0,0 +1,26 @@
1
+ ENV["RAILS_ENV"] ||= 'test'
2
+
3
+ require 'simplecov'
4
+ require 'simplecov-rcov-text'
5
+
6
+ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
7
+ SimpleCov::Formatter::HTMLFormatter,
8
+ SimpleCov::Formatter::RcovTextFormatter,
9
+ ]
10
+
11
+ SimpleCov.start do
12
+ add_filter "spec/dummy"
13
+ add_filter "spec/support"
14
+ add_filter "spec/portier_spec.rb"
15
+ end
16
+
17
+ require File.expand_path("../dummy/config/environment", __FILE__)
18
+
19
+ require 'rspec/rails'
20
+ require 'rspec/autorun'
21
+
22
+ Dir["./spec/support/**/*.rb"].sort.each {|f| require f }
23
+
24
+ RSpec.configure do |config|
25
+ config.mock_with :rspec
26
+ end
@@ -0,0 +1,12 @@
1
+ module ViewHelpers
2
+ def app_mock(options={})
3
+ options.reverse_merge! controller: 'products', action: 'index', params: {}
4
+
5
+ app = double()
6
+
7
+ app.stub(:request).and_return({ controller: options[:controller], action: options[:action] })
8
+ app.stub(:params).and_return(options[:params])
9
+
10
+ return app
11
+ end
12
+ end
metadata ADDED
@@ -0,0 +1,197 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: portier
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.3
5
+ platform: ruby
6
+ authors:
7
+ - Sebastien Rosa
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-04-20 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '4.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '4.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: sqlite3
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec-rails
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: simplecov
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: simplecov-rcov-text
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ description: Portier is an gem that manage permissions in a rails project. The permission
84
+ rules are flexible, non-obstrusive, scalable and can be applied to the controller
85
+ actions, and views.
86
+ email:
87
+ - sebastien@alchimik.com
88
+ executables: []
89
+ extensions: []
90
+ extra_rdoc_files: []
91
+ files:
92
+ - ".gitignore"
93
+ - ".travis.yml"
94
+ - Gemfile
95
+ - LICENSE
96
+ - README.md
97
+ - Rakefile
98
+ - lib/portier.rb
99
+ - lib/portier/.reek
100
+ - lib/portier/application_permission.rb
101
+ - lib/portier/base.rb
102
+ - lib/portier/base_permission.rb
103
+ - lib/portier/engine.rb
104
+ - lib/portier/errors.rb
105
+ - lib/portier/implants/action_controller_implant.rb
106
+ - lib/portier/railtie.rb
107
+ - lib/portier/view_tags_permission.rb
108
+ - portier.gemspec
109
+ - spec/controllers/application_controller_spec.rb
110
+ - spec/dummy/Rakefile
111
+ - spec/dummy/app/controllers/application_controller.rb
112
+ - spec/dummy/app/controllers/examples_controller.rb
113
+ - spec/dummy/app/helpers/application_helper.rb
114
+ - spec/dummy/app/models/anonymou.rb
115
+ - spec/dummy/app/permissions/anonymous_permission.rb
116
+ - spec/dummy/app/permissions/products_permission.rb
117
+ - spec/dummy/app/permissions/view_tags_permission.rb
118
+ - spec/dummy/app/views/layouts/application.html.erb
119
+ - spec/dummy/bin/bundle
120
+ - spec/dummy/bin/rails
121
+ - spec/dummy/bin/rake
122
+ - spec/dummy/config.ru
123
+ - spec/dummy/config/application.rb
124
+ - spec/dummy/config/boot.rb
125
+ - spec/dummy/config/database.yml
126
+ - spec/dummy/config/environment.rb
127
+ - spec/dummy/config/environments/development.rb
128
+ - spec/dummy/config/environments/production.rb
129
+ - spec/dummy/config/environments/test.rb
130
+ - spec/dummy/config/initializers/standard_rails_initializers.rb
131
+ - spec/dummy/config/routes.rb
132
+ - spec/dummy/db/test.sqlite3
133
+ - spec/portier/application_permission_spec.rb
134
+ - spec/portier/base_permission_spec.rb
135
+ - spec/portier/base_spec.rb
136
+ - spec/portier/view_tags_permission_spec.rb
137
+ - spec/portier_spec.rb
138
+ - spec/spec_helper.rb
139
+ - spec/support/views_helper.rb
140
+ homepage: https://bitbucket.org/alchimikweb/portier
141
+ licenses:
142
+ - MIT
143
+ metadata: {}
144
+ post_install_message:
145
+ rdoc_options: []
146
+ require_paths:
147
+ - lib
148
+ required_ruby_version: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ required_rubygems_version: !ruby/object:Gem::Requirement
154
+ requirements:
155
+ - - ">="
156
+ - !ruby/object:Gem::Version
157
+ version: '0'
158
+ requirements: []
159
+ rubyforge_project:
160
+ rubygems_version: 2.2.2
161
+ signing_key:
162
+ specification_version: 4
163
+ summary: Portier is an gem that manage permissions in a rails project. The permission
164
+ rules are flexible, non-obstrusive, scalable and can be applied to the controller
165
+ actions, and views.
166
+ test_files:
167
+ - spec/controllers/application_controller_spec.rb
168
+ - spec/dummy/Rakefile
169
+ - spec/dummy/app/controllers/application_controller.rb
170
+ - spec/dummy/app/controllers/examples_controller.rb
171
+ - spec/dummy/app/helpers/application_helper.rb
172
+ - spec/dummy/app/models/anonymou.rb
173
+ - spec/dummy/app/permissions/anonymous_permission.rb
174
+ - spec/dummy/app/permissions/products_permission.rb
175
+ - spec/dummy/app/permissions/view_tags_permission.rb
176
+ - spec/dummy/app/views/layouts/application.html.erb
177
+ - spec/dummy/bin/bundle
178
+ - spec/dummy/bin/rails
179
+ - spec/dummy/bin/rake
180
+ - spec/dummy/config.ru
181
+ - spec/dummy/config/application.rb
182
+ - spec/dummy/config/boot.rb
183
+ - spec/dummy/config/database.yml
184
+ - spec/dummy/config/environment.rb
185
+ - spec/dummy/config/environments/development.rb
186
+ - spec/dummy/config/environments/production.rb
187
+ - spec/dummy/config/environments/test.rb
188
+ - spec/dummy/config/initializers/standard_rails_initializers.rb
189
+ - spec/dummy/config/routes.rb
190
+ - spec/dummy/db/test.sqlite3
191
+ - spec/portier/application_permission_spec.rb
192
+ - spec/portier/base_permission_spec.rb
193
+ - spec/portier/base_spec.rb
194
+ - spec/portier/view_tags_permission_spec.rb
195
+ - spec/portier_spec.rb
196
+ - spec/spec_helper.rb
197
+ - spec/support/views_helper.rb