Grokbase
Topics Posts Groups | in
x
[ help ]

[Catalyst] "no role configuration found" -- authorization: dbic and DBI::Schema::Loader

View PostFlat  Thread  Threaded | < Prev - Next >
Mark Blythe [Catalyst] "no role configuration found" -- authorization: dbic and DBI::Schema::Loader
| +1 vote
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
While I don't use the DBIx::Class::Loader, I did notice that since the
Catalyst::Plugin::Auth refactor, that set of modules doesn't like dealing
with role_id's any longer.  I ended up creating a database view (and
corresponding DBIC class) that spits out role names rather than role IDs,
and Catalyst::Plugin::Authentication::Store::DBIx::Class liked that much
better.

This may not be the only way to solve it, but it worked for me.


On 12/15/07, Ashley Pond V <apv@sedition.com> wrote:
>
> Progressing=85 Looking at Catalyst/Plugin/Authentication/Store/DBIC/
> User.pm I saw a couple of items in the "authentication" config I
> could set. With "role_relation" and "role_field" set--
>
> authentication:
>    default_realm: users
>    realms:
>      users:
>        credential:
>          class: Password
>          password_field: password
>          password_type: hashed
>          password_hash_type: SHA-1
>        store:
>          class: DBIx::Class
>          user_class: User
>          role_relation: user_roles
>          role_field: role
>
> --I now get the roles checked but they are failing because they are
> checking (returning) the role "id" instead of the "name."
>
> $c->user->roles returns a list of the IDs too. So, from reading this,
> Catalyst::Plugin::Authentication::Store::DBIx::Class::roles()
> it looks like dynamic loader schemas are incompatible right now? I'm
> trying to figure this out but there is a lot of inter-related code to
> read, cross-package-configuration, and documentation drift/lag.
>
> Throw me a bone, er, a line!
> -Ashley
>
>
> On Dec 15, 2007, at 10:18 AM, Ashley Pond V wrote:
> > Can you elaborate? "map_user_role" ne "user_role." I have
> > "role_rel" set to the UserRole class. I tried adding "user_role"
> > but it didn't help and I don't see it anywhere in the docs.
> >
> > I should rephrase, I think. Is anyone using DBIC::Schema::Loader
> > dynamically with role authorization? If so, please share your
> > configuration or advise of which FMTR.
> >
> > Thanks again,
> > -Ashley
> >
>
> _______________________________________________
> List: [email protected: Cat...@lists.scsys.co.uk]
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
>

Thread : [Catalyst] "no role configuration found" -- authorization: dbic and DBI::Schema::Loader
1)
apv I can't get roles to work with an dynamic (Schema::Loader) set of models. I am doing all the config...
2)
Ferruccio Zamuner Ashley Pond V ha scritto: Yes, you have to set user_role relation in config. Bye, \fer...
3)
apv Can you elaborate? "map_user_role" ne "user_role." I have "role_rel" set to the UserRole class. I...
4)
apv Progressing? Looking at Catalyst/Plugin/Authentication/Store/DBIC/ User.pm I saw a couple of items...
5)
Mark Blythe While I don't use the DBIx::Class::Loader, I did notice that since the Catalyst::Plugin::Auth...
6)
Jay K Hi There Ashley, The DBIx::Class module expects to use the relation provided in the role_relation...
7)
apv Thanks Jay! That's in line with the more recent documents (and sort of what I was hoping to avoid)....
8)
apv Continuing saga. So I set up the many_to_many and lo! It worked. But it worked with *any* role,...
9)
Jay K Hi Ashley, The log message you see is a result of the recent move away from the...
10)
apv Thanks for still looking at this, Jay. This is the top of the method with some "die" decoration:...
11)
apv I backed up to a simple test script, got easier to find errors, and found the trouble with what I...
spacer
View PostFlat  Thread  Threaded | < Prev - Next >