Move authorize method out of Authentication module #257

Closed
croaky opened this Issue Feb 13, 2013 · 1 comment

Comments

Projects
None yet
1 participant
Contributor

croaky commented Feb 13, 2013

There has been some confusion about the authorize method residing in the Authentication module. It might be nice to move it elsewhere.

Contributor

croaky commented Feb 24, 2013

I took kind of an aggressive approach to this in #268. Closing this one and letting discussion happen there.

@croaky croaky closed this Feb 24, 2013

geoffharcourt pushed a commit to geoffharcourt/clearance that referenced this issue Jul 8, 2014

Split Clearance::{Authentication,Authorization}
There has been confusion about the `authorize` method residing in the
`Authentication` module:

* The `authorize` method performs authorization - it denies access to
  unauthenticated users.
* It is assumed that controllers would override `authorize` for
  controllers that require specific authentication.
* It's sort of strange that `Clearance::Authentication` contains a bunch
  of authorization logic.

So, we:

* Split `Clearance::Controller` into `Clearance::Authentication` and
  `Clearance::Authorization`, both of which get mixed into
  `Clearance::Controller`.
* Mix `Clearance::Controller` into `ApplicationController` in the install
  generator.

Read more:

thoughtbot#268
thoughtbot#257
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment