varvet--pundit/CHANGELOG.md

128 lines
4.2 KiB
Markdown
Raw Permalink Normal View History

2014-02-09 08:43:33 +00:00
# Pundit
2022-02-11 12:09:26 +00:00
## 2.2.0 (2022-02-11)
2022-01-04 13:56:32 +00:00
### Fixed
- Using `policy_class` and a namespaced record now passes only the record when instantiating the policy. (#697, #689, #694, #666)
### Changed
- Require users to explicitly define Scope#resolve in generated policies (#711, #722)
2022-01-09 10:50:40 +00:00
### Deprecated
- Deprecate `include Pundit` in favor of `include Pundit::Authorization` (#621)
## 2.1.1 (2021-08-13)
Friday 13th-release!
Careful! The bugfix below (#626) could break existing code. If you rely on the
return value for `authorize` and namespaced policies you might need to do some
changes.
2019-11-12 09:21:53 +00:00
### Fixed
- `.authorize` and `#authorize` return the instance, even for namespaced
policies (#626)
### Changed
- Generate application scope with `protected` attr_readers. (#616)
### Removed
2019-11-12 09:21:53 +00:00
- Dropped support for Ruby end-of-life versions: 2.1 and 2.2. (#604)
2019-12-09 10:44:36 +00:00
- Dropped support for Ruby end-of-life versions: 2.3 (#633)
- Dropped support for Ruby end-of-life versions: 2.4, 2.5 and JRuby 9.1 (#676)
2019-11-12 09:21:53 +00:00
- Dropped support for RSpec 2 (#615)
## 2.1.0 (2019-08-14)
2019-08-14 09:38:59 +00:00
### Fixed
2019-04-17 08:54:58 +00:00
2019-08-14 09:38:59 +00:00
- Avoid name clashes with the Error class. (#590)
2019-04-17 08:54:58 +00:00
2019-08-14 09:38:59 +00:00
### Changed
2019-04-17 08:54:58 +00:00
- Return a safer default NotAuthorizedError message. (#583)
2019-01-18 13:04:08 +00:00
## 2.0.1 (2019-01-18)
2018-10-02 11:21:15 +00:00
2019-01-18 11:59:26 +00:00
### Breaking changes
None
2019-01-18 11:59:26 +00:00
### Other changes
2018-10-02 11:21:15 +00:00
- Improve exception handling for `#policy_scope` and `#policy_scope!`. (#550)
2019-01-18 11:59:26 +00:00
- Add `:policy` metadata to RSpec template. (#566)
2018-10-02 11:21:15 +00:00
2018-07-21 18:35:16 +00:00
## 2.0.0 (2018-07-21)
No changes since beta1
2018-07-04 18:47:45 +00:00
## 2.0.0.beta1 (2018-07-04)
### Breaking changes
- Only pass last element of "namespace array" to policy and scope. (#529)
- Raise `InvalidConstructorError` if a policy or policy scope with an invalid constructor is called. (#462)
- Return passed object from `#authorize` method to make chaining possible. (#385)
### Other changes
2018-07-04 18:19:42 +00:00
- Add `policy_class` option to `authorize` to be able to override the policy. (#441)
- Add `policy_scope_class` option to `authorize` to be able to override the policy scope. (#441)
2018-06-17 07:53:26 +00:00
- Fix `param_key` issue when passed an array. (#529)
2018-06-16 19:45:31 +00:00
- Allow specification of a `NilClassPolicy`. (#525)
2018-06-06 18:36:49 +00:00
- Make sure `policy_class` override is called when passed an array. (#475)
2018-06-06 18:36:49 +00:00
- Use `action_name` instead of `params[:action]`. (#419)
2018-05-17 18:18:36 +00:00
- Add `pundit_params_for` method to make it easy to customize params fetching. (#502)
2016-01-14 15:06:50 +00:00
## 1.1.0 (2016-01-14)
- Can retrieve policies via an array of symbols/objects.
- Add autodetection of param key to `permitted_attributes` helper.
- Hide some methods which should not be actions.
- Permitted attributes should be expanded.
- Generator uses `RSpec.describe` according to modern best practices.
2015-05-27 16:31:53 +00:00
## 1.0.1 (2015-05-27)
- Fixed a regression where NotAuthorizedError could not be ininitialized with a string.
- Use `camelize` instead of `classify` for symbol policies to prevent weird pluralizations.
2015-04-19 11:26:56 +00:00
## 1.0.0 (2015-04-19)
2014-08-22 11:26:44 +00:00
- Caches policy scopes and policies.
- Explicitly setting the policy for the controller via `controller.policy = foo` has been removed. Instead use `controller.policies[record] = foo`.
- Explicitly setting the policy scope for the controller via `controller.policy_policy = foo` has been removed. Instead use `controller.policy_scopes[scope] = foo`.
2015-04-19 11:26:56 +00:00
- Add `permitted_attributes` helper to fetch attributes from policy.
- Add `pundit_policy_authorized?` and `pundit_policy_scoped?` methods.
2015-04-19 11:26:56 +00:00
- Instance variables are prefixed to avoid collisions.
- Add `Pundit.authorize` method.
- Add `skip_authorization` and `skip_policy_scope` helpers.
- Better errors when checking multiple permissions in RSpec tests.
- Better errors in case `nil` is passed to `policy` or `policy_scope`.
2015-06-07 07:52:37 +00:00
- Use `inspect` when printing object for better errors.
2015-04-19 11:26:56 +00:00
- Dropped official support for Ruby 1.9.3
2014-08-22 11:26:44 +00:00
## 0.3.0 (2014-08-22)
2014-04-28 21:00:48 +00:00
- Extend the default `ApplicationPolicy` with an `ApplicationPolicy::Scope` (#120)
2014-07-13 09:07:01 +00:00
- Fix RSpec 3 deprecation warnings for built-in matchers (#162)
- Generate blank policy spec/test files for Rspec/MiniTest/Test::Unit in Rails (#138)
2014-04-28 21:00:48 +00:00
2014-04-06 22:22:38 +00:00
## 0.2.3 (2014-04-06)
2014-02-09 08:43:33 +00:00
2014-04-28 21:00:48 +00:00
- Customizable error messages: `#query`, `#record` and `#policy` methods on `Pundit::NotAuthorizedError` (#114)
- Raise a different `Pundit::AuthorizationNotPerformedError` when `authorize` call is expected in controller action but missing (#109)
- Update Rspec matchers for Rspec 3 (#124)
2014-02-09 08:43:33 +00:00
## 0.2.2 (2014-02-07)
2014-04-28 21:00:48 +00:00
- Customize the user to be passed into policies: `pundit_user` (#42)