# Authorization plugin ....broken?

**URL:** <https://www.ruby-forum.com/t/authorization-plugin-broken/143034>\
**Category:** Rails\
**Created:** [July 14, 2008, 5:46pm UTC](https://www.ruby-forum.com/t/authorization-plugin-broken/143034 "2008-07-14T17:46:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![eblatt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/7bcc69/32.png) [@eblatt](https://www.ruby-forum.com/u/eblatt)\
**Post date:** [July 14, 2008, 5:46pm UTC](https://www.ruby-forum.com/t/authorization-plugin-broken/143034/1 "2008-07-14T17:46:57Z")

</div>

Hello,

I’ve used the authorization plugin for a long time (3 months) with great  
success. Recently, I began a new project and installed the plugin in  
this manner:

./script/plugin install  
[http://rails-authorization-plugin.googlecode.com/svn/trunk/authorization](http://rails-authorization-plugin.googlecode.com/svn/trunk/authorization)

I know there’s lots of git activity on this project and there may be a  
more recent version.

My basic problem that I get:

“Cannot parse authorization (editor of calendar)”

My code:

```
@calendar = Calendar.find(params[:id])
permit "editor of calendar"

```

naturally, my user does have the role of editor (as I’ve said, I’ve got  
code like this working millions of times) and I just can understand why  
it’s failing now.

Any ideas?

---

<div class="post-metadata">

**Author:** ![eblatt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/7bcc69/32.png) [@eblatt](https://www.ruby-forum.com/u/eblatt)\
**Post date:** [August 27, 2008, 6:52pm UTC](https://www.ruby-forum.com/t/authorization-plugin-broken/143034/2 "2008-08-27T18:52:46Z")

</div>

I am having the same issue , did you manage to resolve this ?

it seems that if i try to access a page that has the permissions  
requirements directly i will get the error, but i can avoid it by  
going through home and then navigating from there with menu …  
I think it must be somesort of a loading error, as the methods  
injected by the plugin “accept\_role?” and such are not present at the  
time of the error .

any thoughts would be greatly appreciated !  
cheers

On Jul 14, 11:46 am, Elliott B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![eblatt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/7bcc69/32.png) [@eblatt](https://www.ruby-forum.com/u/eblatt)\
**Post date:** [August 27, 2008, 7:19pm UTC](https://www.ruby-forum.com/t/authorization-plugin-broken/143034/3 "2008-08-27T19:19:42Z")

</div>

Mcgill Guy wrote:

> I am having the same issue , did you manage to resolve this ?
> 
> it seems that if i try to access a page that has the permissions  
> requirements directly i will get the error, but i can avoid it by  
> going through home and then navigating from there with menu …  
> I think it must be somesort of a loading error, as the methods  
> injected by the plugin “accept\_role?” and such are not present at the  
> time of the error .
> 
> any thoughts would be greatly appreciated !  
> cheers
> 
> On Jul 14, 11:46ï¿½am, Elliott B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

The plugin was not broken. I had done something stupid. Before  
installing the plugin, I had stubbed out a method like this:

def has\_role?  
true  
end

This method was called in place of the the method defined by the plugin.  
Once I removed the stubbed version, everything worked fine.

Have you defined any method in your user model that might conflict?
