All Versions
13
Latest Version
Avg Release Cycle
34 days
Latest Release
2351 days ago
Changelog History
Page 2
Changelog History
Page 2
-
v0.12.0 Changes
January 01, 2016- โจ Enhancements
- Canary can now be configured to call a user-defined function when authorization fails. Canary will pass the
Plug.Conn
for the request to the given function. The handler should accept aPlug.Conn
as its only argument, and should return aPlug.Conn
. - For example, to have Canary call
Helpers.handle_unauthorized/1
:elixir config :canary, unauthorized_handler: {Helpers, :handle_unauthorized}
- You can also specify the
:unauthorized_handler
on an individual basis by specifying the:unauthorized_handler
opt
in the plug call like so:elixir plug :load_and_authorize_resource Post, unauthorized_handler: {Helpers, :handle_unauthorized}
- Canary can now be configured to call a user-defined function when authorization fails. Canary will pass the
- โจ Enhancements
-
v0.11.0 Changes
December 22, 2015- โจ Enhancements
- Resources can now be loaded on
:new
and:create
actions, whenpersisted: true
is specified in the plug call. This allows parent resources to be loaded when a child is created. For example, if aPost
resource has multipleComment
children, you may want to load the parentPost
when creating a newComment
. You can load the parentPost
with a separateelixir plug :load_and_authorize_resource, model: Post, id_name: "post_id", persisted: true, only: [:create]
This will cause Canary to try to load the correspondingPost
from the database when creating aComment
at the URL/posts/:post_id/comments
- Resources can now be loaded on
- โจ Enhancements
-
v0.10.0 Changes
๐ Bug fix
- Correctly checks
conn.assigns
for pre-existing resource
- Correctly checks
๐ Deprecations
- Canary now favours looking for the current action in
conn.assigns.canary_action
rather thanconn.assigns.action
in order to avoid conflicts. Theaction
key is deprecated
- Canary now favours looking for the current action in
โจ Enhancements
- The name of the id in
conn.params
can now be specified with theid_name
opt
- The name of the id in