ok guys...thats was really a silly mistake...
In my User model I had following statemnt
def has_role?(role,options)
true
end
-Invincible.
On 4/17/07, Invincible Code
<invincible.coder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
> Hi,
>
>
> I am trying to use Authorization plugin for providing access control for
> my application.Application has 2 types of users, admins and end-users both
> being maintained in a single table with calles users and with the helps of
> users and admins using STI.
> When I make my admin model "user-like" by including statement
> "acts_as_authorized_user" and have something like " permit
''admin'' " in any
> of the controller, it gives following error in development log,
>
> "There is not table by name ROLES_ADMINS"
>
> Looks like authorization plugin just reads the class name and tries to
> find a table with roles_#{class_name}.
>
> On a second attempt I tried including acts_as_authorized_user in User
> model which is extended by Admin and EndUser Models...despite of having
> permit ''admin'' statement, Rails allows all the controller
actions visible to
> all the users irrespective of their role :(
>
>
> Has anyone tried this before?
>
>
> -Invincible
>
>
>
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---