You can clone with
HTTPS or Subversion.
I'm hesitant to pull this in directly because I don't want to load every controller with so many additional methods. My plan is to create a separate object where all of this logic can reside and I can refactor freely. I will take some of your changes into that object though, thanks!
refactoring out controller logic into separate ResourceAuthorization class - closed by da5a5c0