# Is there an authorization gem/plugin that tells why exactly authorization failed?

**URL:** <https://www.ruby-forum.com/t/is-there-an-authorization-gem-plugin-that-tells-why-exactly-authorization-failed/204643>\
**Category:** Rails\
**Created:** [March 17, 2011, 4:52pm UTC](https://www.ruby-forum.com/t/is-there-an-authorization-gem-plugin-that-tells-why-exactly-authorization-failed/204643 "2011-03-17T16:52:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [March 17, 2011, 4:52pm UTC](https://www.ruby-forum.com/t/is-there-an-authorization-gem-plugin-that-tells-why-exactly-authorization-failed/204643/1 "2011-03-17T16:52:33Z")

</div>

Hey,

I’m currently using cancan, but we got a problem with it. In my app  
users  
got roles and they can also be banned by other users. The problem with  
cancan is that I don’t know if authorization failed because user has not  
enough privileges to perform an action, or it’s because he was banned by  
other user. In both cases I’d like to provide a different response…

Is it possible to achieve something like this with cancan (using  
multiple  
abilities maybe) or are there any other simple authorization libraries  
that  
provide such info?

Cheers,  
Szymon
