rails_ops 1.0.19 → 1.0.20

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2a74561e958b919219da242d588f60e5a7e53791ef359af0f3acdfc842af63e4
4
- data.tar.gz: 30b3180d590e03be6331ba5aa7b242e57bc02f5c331fccf750a49d0d60ca2fa2
3
+ metadata.gz: '0926954940928d36670c2390e05b6304e604d720b4a23fafa38b15d0dd32ed1a'
4
+ data.tar.gz: 589ff18749fb09feb6b2e396374bf710fb6d76c531f8e67fe1a6ad836ece0f60
5
5
  SHA512:
6
- metadata.gz: 7064ce97b74fe5e558352672c7a3c5a44cb35709fe7cb072ad0461ec0c0f721a77ebae05370ab91be6919f2a65806e625254c1bffbef09a248e05d8d28c260b0
7
- data.tar.gz: 534e08d05e1f0746e761cc1c8a8f729889681b0a9f76917685b7c9aedcf95e37a95c3d0dc456191bbe0265f28378657e2d7eb44c6530cfa2f14b183aa079d0a0
6
+ metadata.gz: 1638ef069a9827415f529d890fa4e91f0348b59f2c3f02312bb38825250c25160e6d83800d18db770c6abdfdcb5d1f244478de8d2b551f36f6a9c329c63ba6ef
7
+ data.tar.gz: 72c282d6acd1f3151844daa01843f80610200be564e7ae8a251ee1e8fd3bf91ae1c12e448a78f3a37ad4af2fc514625f5f25f207ad0a00a4cdf707c2d70638fa
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change log
2
2
 
3
+ ## 1.0.20 (2020-02-13)
4
+
5
+ * Add param authorization functionality using `authorize_param`
6
+
3
7
  ## 1.0.19 (2020-02-11)
4
8
 
5
9
  * Fix examples in readme
data/README.md CHANGED
@@ -769,6 +769,59 @@ end
769
769
  This method otherwise does exactly the same as `authorize!` (in fact, it's the
770
770
  underlying method used by it).
771
771
 
772
+ ### Param authorization
773
+
774
+ Using the static operation method `authorize_param`, you can perform additional
775
+ authorization checks when specific params are passed to the operation. This
776
+ allows you to disallow certain params, i.e. when updating a model and wanting to
777
+ restrict the user to certain fields.
778
+
779
+ When using non-model operations (operations not inheriting from
780
+ `RailsOps::Operation::Model` or one of its subclasses), `authorize_param`
781
+ requires you to specify an `action` and optional, additional args or a block
782
+ that performs custom authorization:
783
+
784
+ ```ruby
785
+ class Operations::User::DoSomething < RailsOps::Operation
786
+ schema do
787
+ opt :user do
788
+ opt :name
789
+ opt :group_id
790
+ end
791
+ end
792
+
793
+ # Example with passing an action and additional args
794
+ authorize_param %i(user group_id), :update_group_id, :some_subject
795
+
796
+ # Example with passing a block
797
+ authorize_param %i(user group_id) do
798
+ # This is executed in the context of the op instance
799
+ fail 'Some message' unless user_has_permission?
800
+ end
801
+ ```
802
+
803
+ The first param always provides the path to the param to be checked for
804
+ existence. Note that this only works with nested hash structures, but not with
805
+ arrays and other objects. The first level of the `params` hash is always using
806
+ indifferent access, so it does not matter whether you pass a symbol or a string
807
+ as the first path segment. For additional path segments, it needs to match the
808
+ actual type that is used as hash key. For example: `[:user, 'group_id']`.
809
+
810
+ For model operations, you only need to pass a `path` and an `action` if you want
811
+ to perform authorization on your model:
812
+
813
+ ```ruby
814
+ class Operations::User::Create < RailsOps::Operation::Model::Create
815
+ schema do
816
+ opt :user do
817
+ opt :name
818
+ opt :group_id
819
+ end
820
+ end
821
+
822
+ authorize_param %i(user group_id), :assign_group_id
823
+ ```
824
+
772
825
  ### Disabling authorization
773
826
 
774
827
  Sometimes you don't want a specific operation to perform authorization, or you
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.19
1
+ 1.0.20
@@ -3,5 +3,12 @@ module RailsOps::AuthorizationBackend
3
3
  def authorize!(_operation, *_args)
4
4
  fail NotImplementedError
5
5
  end
6
+
7
+ def exception_class
8
+ @exception_class ||= self.class::EXCEPTION_CLASS.constantize
9
+ rescue NameError
10
+ fail "Unable to constantize exception class #{self.class::EXCEPTION_CLASS.inspect} "\
11
+ "for authorization backend #{self.class.name}. Is the library loaded?"
12
+ end
6
13
  end
7
14
  end
@@ -1,8 +1,13 @@
1
+ require 'cancan'
2
+
1
3
  module RailsOps::AuthorizationBackend
2
4
  class CanCanCan < Abstract
5
+ EXCEPTION_CLASS = 'CanCan::AccessDenied'
6
+
3
7
  def initialize
4
8
  unless defined?(CanCanCan)
5
- fail "RailsOps is configured to use CanCanCan authorization backend, but the Gem 'cancancan' does not appear to be installed."
9
+ fail 'RailsOps is configured to use CanCanCan authorization'\
10
+ "backend, but the Gem 'cancancan' does not appear to be installed."
6
11
  end
7
12
  end
8
13
 
@@ -19,6 +19,28 @@ module RailsOps::Mixins::Model::Authorization
19
19
 
20
20
  return _model_authorization_action
21
21
  end
22
+
23
+ # This wraps the original method
24
+ # {RailsOps::Mixins::ParamAuthorization::ClassClassMethods.authorize_param}
25
+ # to automatically use `authorize_model_with_authorize_only` and pass the
26
+ # operations `model` to it (besides the given `action` and optional,
27
+ # additional `*args`.
28
+ #
29
+ # If a block or no action is given, the original method will be called. See
30
+ # the original method documentation for more information.
31
+ def authorize_param(path, action = nil, *args, &block)
32
+ if block_given? || action.blank?
33
+ super
34
+ else
35
+ super(path) do
36
+ authorize_model_with_authorize_only!(
37
+ action,
38
+ model,
39
+ *args
40
+ )
41
+ end
42
+ end
43
+ end
22
44
  end
23
45
 
24
46
  def model_authorization_action
@@ -0,0 +1,64 @@
1
+ module RailsOps::Mixins::ParamAuthorization
2
+ extend ActiveSupport::Concern
3
+
4
+ included do
5
+ class_attribute :_param_authorizations
6
+
7
+ self._param_authorizations = [].freeze
8
+ end
9
+
10
+ module ClassMethods
11
+ # Call this method to perform authorization if a specific parameter is
12
+ # passed in the operations `params` hash.
13
+ #
14
+ # Note that this does not work for params contained in other structures than
15
+ # nested hashes. I.e. params within arrays can not be extracted.
16
+ #
17
+ # @param path [Array] An array, usually of symbols or strings, which can be
18
+ # used to dig for the respective parameter you want to authorize.
19
+ #
20
+ # @param action [Object] The `action` passed to the authorization backend.
21
+ #
22
+ # @param *args [Array<Object>] Additional arguments passed to the
23
+ # authorization backend.
24
+ #
25
+ # @yield A block used for custom authorization. The block is only called if
26
+ # the specified parameter is contained in the `params` hash and is supposed
27
+ # to throw an authorization exception if the authorization failed. The
28
+ # exception must be of the exception class specified in your configured
29
+ # authorization backend. The block receives no arguments and is executed
30
+ # in context of the operation instance.
31
+ def authorize_param(path, action = nil, *args, &block)
32
+ # Validate parameters
33
+ if block_given? && (action || args.any?)
34
+ fail ArgumentError,
35
+ 'If you pass an authorization block, no action and additional args are supported.'
36
+ elsif !block_given? && !action
37
+ fail ArgumentError,
38
+ 'You need to supply an action and additional args if no authorization block is provided.'
39
+ end
40
+
41
+ policy do
42
+ # Abort unless param is given
43
+ if path.size > 1
44
+ next unless params.dig(*path[0..-2])&.include?(path.last)
45
+ else
46
+ next unless params.include?(path.first)
47
+ end
48
+
49
+ # Check authorization
50
+ exception_class = RailsOps.authorization_backend.exception_class
51
+
52
+ begin
53
+ if block_given?
54
+ instance_exec(&block)
55
+ else
56
+ authorize_only!(action, *args)
57
+ end
58
+ rescue exception_class
59
+ fail exception_class, "Got unauthorized param #{path.join('.').inspect}."
60
+ end
61
+ end
62
+ end
63
+ end
64
+ end
@@ -3,6 +3,7 @@ class RailsOps::Operation
3
3
  include RailsOps::Mixins::SubOps
4
4
  include RailsOps::Mixins::SchemaValidation
5
5
  include RailsOps::Mixins::Authorization
6
+ include RailsOps::Mixins::ParamAuthorization
6
7
  include RailsOps::Mixins::RequireContext
7
8
  include RailsOps::Mixins::LogSettings
8
9
 
data/lib/rails_ops.rb CHANGED
@@ -75,6 +75,7 @@ require 'rails_ops/hookup/hook.rb'
75
75
  require 'rails_ops/log_subscriber.rb'
76
76
  require 'rails_ops/mixins.rb'
77
77
  require 'rails_ops/mixins/authorization.rb'
78
+ require 'rails_ops/mixins/param_authorization.rb'
78
79
  require 'rails_ops/mixins/log_settings.rb'
79
80
  require 'rails_ops/mixins/model.rb'
80
81
  require 'rails_ops/mixins/model/authorization.rb'
data/rails_ops.gemspec CHANGED
@@ -1,16 +1,16 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: rails_ops 1.0.19 ruby lib
2
+ # stub: rails_ops 1.0.20 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "rails_ops".freeze
6
- s.version = "1.0.19"
6
+ s.version = "1.0.20"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib".freeze]
10
10
  s.authors = ["Sitrox".freeze]
11
- s.date = "2020-02-11"
12
- s.files = [".gitignore".freeze, ".releaser_config".freeze, ".rubocop.yml".freeze, ".travis.yml".freeze, "CHANGELOG.md".freeze, "Gemfile".freeze, "LICENSE.txt".freeze, "README.md".freeze, "Rakefile".freeze, "VERSION".freeze, "lib/rails_ops.rb".freeze, "lib/rails_ops/authorization_backend/abstract.rb".freeze, "lib/rails_ops/authorization_backend/can_can_can.rb".freeze, "lib/rails_ops/configuration.rb".freeze, "lib/rails_ops/context.rb".freeze, "lib/rails_ops/controller_mixin.rb".freeze, "lib/rails_ops/exceptions.rb".freeze, "lib/rails_ops/hooked_job.rb".freeze, "lib/rails_ops/hookup.rb".freeze, "lib/rails_ops/hookup/dsl.rb".freeze, "lib/rails_ops/hookup/dsl_validator.rb".freeze, "lib/rails_ops/hookup/hook.rb".freeze, "lib/rails_ops/log_subscriber.rb".freeze, "lib/rails_ops/mixins.rb".freeze, "lib/rails_ops/mixins/authorization.rb".freeze, "lib/rails_ops/mixins/log_settings.rb".freeze, "lib/rails_ops/mixins/model.rb".freeze, "lib/rails_ops/mixins/model/authorization.rb".freeze, "lib/rails_ops/mixins/model/nesting.rb".freeze, "lib/rails_ops/mixins/policies.rb".freeze, "lib/rails_ops/mixins/require_context.rb".freeze, "lib/rails_ops/mixins/routes.rb".freeze, "lib/rails_ops/mixins/schema_validation.rb".freeze, "lib/rails_ops/mixins/sub_ops.rb".freeze, "lib/rails_ops/model_casting.rb".freeze, "lib/rails_ops/model_mixins.rb".freeze, "lib/rails_ops/model_mixins/ar_extension.rb".freeze, "lib/rails_ops/model_mixins/parent_op.rb".freeze, "lib/rails_ops/model_mixins/virtual_attributes.rb".freeze, "lib/rails_ops/model_mixins/virtual_attributes/virtual_column_wrapper.rb".freeze, "lib/rails_ops/model_mixins/virtual_has_one.rb".freeze, "lib/rails_ops/model_mixins/virtual_model_name.rb".freeze, "lib/rails_ops/operation.rb".freeze, "lib/rails_ops/operation/model.rb".freeze, "lib/rails_ops/operation/model/create.rb".freeze, "lib/rails_ops/operation/model/destroy.rb".freeze, "lib/rails_ops/operation/model/load.rb".freeze, "lib/rails_ops/operation/model/update.rb".freeze, "lib/rails_ops/patches/active_type_patch.rb".freeze, "lib/rails_ops/profiler.rb".freeze, "lib/rails_ops/profiler/node.rb".freeze, "lib/rails_ops/railtie.rb".freeze, "lib/rails_ops/scoped_env.rb".freeze, "lib/rails_ops/virtual_model.rb".freeze, "rails_ops.gemspec".freeze, "test/db/models.rb".freeze, "test/db/schema.rb".freeze, "test/dummy/Rakefile".freeze, "test/dummy/app/assets/config/manifest.js".freeze, "test/dummy/app/assets/images/.keep".freeze, "test/dummy/app/assets/javascripts/application.js".freeze, "test/dummy/app/assets/javascripts/cable.js".freeze, "test/dummy/app/assets/javascripts/channels/.keep".freeze, "test/dummy/app/assets/stylesheets/application.css".freeze, "test/dummy/app/channels/application_cable/channel.rb".freeze, "test/dummy/app/channels/application_cable/connection.rb".freeze, "test/dummy/app/controllers/application_controller.rb".freeze, "test/dummy/app/controllers/concerns/.keep".freeze, "test/dummy/app/helpers/application_helper.rb".freeze, "test/dummy/app/jobs/application_job.rb".freeze, "test/dummy/app/mailers/application_mailer.rb".freeze, "test/dummy/app/models/application_record.rb".freeze, "test/dummy/app/models/concerns/.keep".freeze, "test/dummy/app/models/group.rb".freeze, "test/dummy/app/views/layouts/application.html.erb".freeze, "test/dummy/app/views/layouts/mailer.html.erb".freeze, "test/dummy/app/views/layouts/mailer.text.erb".freeze, "test/dummy/bin/bundle".freeze, "test/dummy/bin/rails".freeze, "test/dummy/bin/rake".freeze, "test/dummy/bin/setup".freeze, "test/dummy/bin/update".freeze, "test/dummy/bin/yarn".freeze, "test/dummy/config.ru".freeze, "test/dummy/config/application.rb".freeze, "test/dummy/config/boot.rb".freeze, "test/dummy/config/cable.yml".freeze, "test/dummy/config/database.yml".freeze, "test/dummy/config/environment.rb".freeze, "test/dummy/config/environments/development.rb".freeze, "test/dummy/config/environments/production.rb".freeze, "test/dummy/config/environments/test.rb".freeze, "test/dummy/config/initializers/application_controller_renderer.rb".freeze, "test/dummy/config/initializers/assets.rb".freeze, "test/dummy/config/initializers/backtrace_silencers.rb".freeze, "test/dummy/config/initializers/cookies_serializer.rb".freeze, "test/dummy/config/initializers/filter_parameter_logging.rb".freeze, "test/dummy/config/initializers/inflections.rb".freeze, "test/dummy/config/initializers/mime_types.rb".freeze, "test/dummy/config/initializers/rails_ops.rb".freeze, "test/dummy/config/initializers/wrap_parameters.rb".freeze, "test/dummy/config/locales/en.yml".freeze, "test/dummy/config/puma.rb".freeze, "test/dummy/config/routes.rb".freeze, "test/dummy/config/secrets.yml".freeze, "test/dummy/config/spring.rb".freeze, "test/dummy/db/schema.rb".freeze, "test/dummy/lib/assets/.keep".freeze, "test/dummy/log/.keep".freeze, "test/dummy/package.json".freeze, "test/dummy/public/404.html".freeze, "test/dummy/public/422.html".freeze, "test/dummy/public/500.html".freeze, "test/dummy/public/apple-touch-icon-precomposed.png".freeze, "test/dummy/public/apple-touch-icon.png".freeze, "test/dummy/public/favicon.ico".freeze, "test/dummy/tmp/.keep".freeze, "test/test_helper.rb".freeze, "test/unit/rails_ops/mixins/model/nesting.rb".freeze, "test/unit/rails_ops/mixins/policies_test.rb".freeze, "test/unit/rails_ops/operation/model/create_test.rb".freeze, "test/unit/rails_ops/operation/model/load_test.rb".freeze, "test/unit/rails_ops/operation/model/update_test.rb".freeze, "test/unit/rails_ops/operation/model_test.rb".freeze, "test/unit/rails_ops/operation_test.rb".freeze]
13
- s.rubygems_version = "3.0.3".freeze
11
+ s.date = "2020-02-13"
12
+ s.files = [".gitignore".freeze, ".releaser_config".freeze, ".rubocop.yml".freeze, ".travis.yml".freeze, "CHANGELOG.md".freeze, "Gemfile".freeze, "LICENSE.txt".freeze, "README.md".freeze, "Rakefile".freeze, "VERSION".freeze, "lib/rails_ops.rb".freeze, "lib/rails_ops/authorization_backend/abstract.rb".freeze, "lib/rails_ops/authorization_backend/can_can_can.rb".freeze, "lib/rails_ops/configuration.rb".freeze, "lib/rails_ops/context.rb".freeze, "lib/rails_ops/controller_mixin.rb".freeze, "lib/rails_ops/exceptions.rb".freeze, "lib/rails_ops/hooked_job.rb".freeze, "lib/rails_ops/hookup.rb".freeze, "lib/rails_ops/hookup/dsl.rb".freeze, "lib/rails_ops/hookup/dsl_validator.rb".freeze, "lib/rails_ops/hookup/hook.rb".freeze, "lib/rails_ops/log_subscriber.rb".freeze, "lib/rails_ops/mixins.rb".freeze, "lib/rails_ops/mixins/authorization.rb".freeze, "lib/rails_ops/mixins/log_settings.rb".freeze, "lib/rails_ops/mixins/model.rb".freeze, "lib/rails_ops/mixins/model/authorization.rb".freeze, "lib/rails_ops/mixins/model/nesting.rb".freeze, "lib/rails_ops/mixins/param_authorization.rb".freeze, "lib/rails_ops/mixins/policies.rb".freeze, "lib/rails_ops/mixins/require_context.rb".freeze, "lib/rails_ops/mixins/routes.rb".freeze, "lib/rails_ops/mixins/schema_validation.rb".freeze, "lib/rails_ops/mixins/sub_ops.rb".freeze, "lib/rails_ops/model_casting.rb".freeze, "lib/rails_ops/model_mixins.rb".freeze, "lib/rails_ops/model_mixins/ar_extension.rb".freeze, "lib/rails_ops/model_mixins/parent_op.rb".freeze, "lib/rails_ops/model_mixins/virtual_attributes.rb".freeze, "lib/rails_ops/model_mixins/virtual_attributes/virtual_column_wrapper.rb".freeze, "lib/rails_ops/model_mixins/virtual_has_one.rb".freeze, "lib/rails_ops/model_mixins/virtual_model_name.rb".freeze, "lib/rails_ops/operation.rb".freeze, "lib/rails_ops/operation/model.rb".freeze, "lib/rails_ops/operation/model/create.rb".freeze, "lib/rails_ops/operation/model/destroy.rb".freeze, "lib/rails_ops/operation/model/load.rb".freeze, "lib/rails_ops/operation/model/update.rb".freeze, "lib/rails_ops/patches/active_type_patch.rb".freeze, "lib/rails_ops/profiler.rb".freeze, "lib/rails_ops/profiler/node.rb".freeze, "lib/rails_ops/railtie.rb".freeze, "lib/rails_ops/scoped_env.rb".freeze, "lib/rails_ops/virtual_model.rb".freeze, "rails_ops.gemspec".freeze, "test/db/models.rb".freeze, "test/db/schema.rb".freeze, "test/dummy/Rakefile".freeze, "test/dummy/app/assets/config/manifest.js".freeze, "test/dummy/app/assets/images/.keep".freeze, "test/dummy/app/assets/javascripts/application.js".freeze, "test/dummy/app/assets/javascripts/cable.js".freeze, "test/dummy/app/assets/javascripts/channels/.keep".freeze, "test/dummy/app/assets/stylesheets/application.css".freeze, "test/dummy/app/channels/application_cable/channel.rb".freeze, "test/dummy/app/channels/application_cable/connection.rb".freeze, "test/dummy/app/controllers/application_controller.rb".freeze, "test/dummy/app/controllers/concerns/.keep".freeze, "test/dummy/app/helpers/application_helper.rb".freeze, "test/dummy/app/jobs/application_job.rb".freeze, "test/dummy/app/mailers/application_mailer.rb".freeze, "test/dummy/app/models/application_record.rb".freeze, "test/dummy/app/models/concerns/.keep".freeze, "test/dummy/app/models/group.rb".freeze, "test/dummy/app/views/layouts/application.html.erb".freeze, "test/dummy/app/views/layouts/mailer.html.erb".freeze, "test/dummy/app/views/layouts/mailer.text.erb".freeze, "test/dummy/bin/bundle".freeze, "test/dummy/bin/rails".freeze, "test/dummy/bin/rake".freeze, "test/dummy/bin/setup".freeze, "test/dummy/bin/update".freeze, "test/dummy/bin/yarn".freeze, "test/dummy/config.ru".freeze, "test/dummy/config/application.rb".freeze, "test/dummy/config/boot.rb".freeze, "test/dummy/config/cable.yml".freeze, "test/dummy/config/database.yml".freeze, "test/dummy/config/environment.rb".freeze, "test/dummy/config/environments/development.rb".freeze, "test/dummy/config/environments/production.rb".freeze, "test/dummy/config/environments/test.rb".freeze, "test/dummy/config/initializers/application_controller_renderer.rb".freeze, "test/dummy/config/initializers/assets.rb".freeze, "test/dummy/config/initializers/backtrace_silencers.rb".freeze, "test/dummy/config/initializers/cookies_serializer.rb".freeze, "test/dummy/config/initializers/filter_parameter_logging.rb".freeze, "test/dummy/config/initializers/inflections.rb".freeze, "test/dummy/config/initializers/mime_types.rb".freeze, "test/dummy/config/initializers/rails_ops.rb".freeze, "test/dummy/config/initializers/wrap_parameters.rb".freeze, "test/dummy/config/locales/en.yml".freeze, "test/dummy/config/puma.rb".freeze, "test/dummy/config/routes.rb".freeze, "test/dummy/config/secrets.yml".freeze, "test/dummy/config/spring.rb".freeze, "test/dummy/db/schema.rb".freeze, "test/dummy/lib/assets/.keep".freeze, "test/dummy/log/.keep".freeze, "test/dummy/package.json".freeze, "test/dummy/public/404.html".freeze, "test/dummy/public/422.html".freeze, "test/dummy/public/500.html".freeze, "test/dummy/public/apple-touch-icon-precomposed.png".freeze, "test/dummy/public/apple-touch-icon.png".freeze, "test/dummy/public/favicon.ico".freeze, "test/dummy/tmp/.keep".freeze, "test/test_helper.rb".freeze, "test/unit/rails_ops/mixins/model/nesting.rb".freeze, "test/unit/rails_ops/mixins/policies_test.rb".freeze, "test/unit/rails_ops/operation/model/create_test.rb".freeze, "test/unit/rails_ops/operation/model/load_test.rb".freeze, "test/unit/rails_ops/operation/model/update_test.rb".freeze, "test/unit/rails_ops/operation/model_test.rb".freeze, "test/unit/rails_ops/operation_test.rb".freeze]
13
+ s.rubygems_version = "3.0.6".freeze
14
14
  s.summary = "An operations service layer for rails projects.".freeze
15
15
  s.test_files = ["test/db/models.rb".freeze, "test/db/schema.rb".freeze, "test/dummy/Rakefile".freeze, "test/dummy/app/assets/config/manifest.js".freeze, "test/dummy/app/assets/images/.keep".freeze, "test/dummy/app/assets/javascripts/application.js".freeze, "test/dummy/app/assets/javascripts/cable.js".freeze, "test/dummy/app/assets/javascripts/channels/.keep".freeze, "test/dummy/app/assets/stylesheets/application.css".freeze, "test/dummy/app/channels/application_cable/channel.rb".freeze, "test/dummy/app/channels/application_cable/connection.rb".freeze, "test/dummy/app/controllers/application_controller.rb".freeze, "test/dummy/app/controllers/concerns/.keep".freeze, "test/dummy/app/helpers/application_helper.rb".freeze, "test/dummy/app/jobs/application_job.rb".freeze, "test/dummy/app/mailers/application_mailer.rb".freeze, "test/dummy/app/models/application_record.rb".freeze, "test/dummy/app/models/concerns/.keep".freeze, "test/dummy/app/models/group.rb".freeze, "test/dummy/app/views/layouts/application.html.erb".freeze, "test/dummy/app/views/layouts/mailer.html.erb".freeze, "test/dummy/app/views/layouts/mailer.text.erb".freeze, "test/dummy/bin/bundle".freeze, "test/dummy/bin/rails".freeze, "test/dummy/bin/rake".freeze, "test/dummy/bin/setup".freeze, "test/dummy/bin/update".freeze, "test/dummy/bin/yarn".freeze, "test/dummy/config.ru".freeze, "test/dummy/config/application.rb".freeze, "test/dummy/config/boot.rb".freeze, "test/dummy/config/cable.yml".freeze, "test/dummy/config/database.yml".freeze, "test/dummy/config/environment.rb".freeze, "test/dummy/config/environments/development.rb".freeze, "test/dummy/config/environments/production.rb".freeze, "test/dummy/config/environments/test.rb".freeze, "test/dummy/config/initializers/application_controller_renderer.rb".freeze, "test/dummy/config/initializers/assets.rb".freeze, "test/dummy/config/initializers/backtrace_silencers.rb".freeze, "test/dummy/config/initializers/cookies_serializer.rb".freeze, "test/dummy/config/initializers/filter_parameter_logging.rb".freeze, "test/dummy/config/initializers/inflections.rb".freeze, "test/dummy/config/initializers/mime_types.rb".freeze, "test/dummy/config/initializers/rails_ops.rb".freeze, "test/dummy/config/initializers/wrap_parameters.rb".freeze, "test/dummy/config/locales/en.yml".freeze, "test/dummy/config/puma.rb".freeze, "test/dummy/config/routes.rb".freeze, "test/dummy/config/secrets.yml".freeze, "test/dummy/config/spring.rb".freeze, "test/dummy/db/schema.rb".freeze, "test/dummy/lib/assets/.keep".freeze, "test/dummy/log/.keep".freeze, "test/dummy/package.json".freeze, "test/dummy/public/404.html".freeze, "test/dummy/public/422.html".freeze, "test/dummy/public/500.html".freeze, "test/dummy/public/apple-touch-icon-precomposed.png".freeze, "test/dummy/public/apple-touch-icon.png".freeze, "test/dummy/public/favicon.ico".freeze, "test/dummy/tmp/.keep".freeze, "test/test_helper.rb".freeze, "test/unit/rails_ops/mixins/model/nesting.rb".freeze, "test/unit/rails_ops/mixins/policies_test.rb".freeze, "test/unit/rails_ops/operation/model/create_test.rb".freeze, "test/unit/rails_ops/operation/model/load_test.rb".freeze, "test/unit/rails_ops/operation/model/update_test.rb".freeze, "test/unit/rails_ops/operation/model_test.rb".freeze, "test/unit/rails_ops/operation_test.rb".freeze]
16
16
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_ops
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.19
4
+ version: 1.0.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sitrox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-11 00:00:00.000000000 Z
11
+ date: 2020-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -171,6 +171,7 @@ files:
171
171
  - lib/rails_ops/mixins/model.rb
172
172
  - lib/rails_ops/mixins/model/authorization.rb
173
173
  - lib/rails_ops/mixins/model/nesting.rb
174
+ - lib/rails_ops/mixins/param_authorization.rb
174
175
  - lib/rails_ops/mixins/policies.rb
175
176
  - lib/rails_ops/mixins/require_context.rb
176
177
  - lib/rails_ops/mixins/routes.rb