in reply to Catalyst::Plugin::Authorization -- dont have "role_rel" for one table

As I see it you have several options

In the end though, you can't simply change the configuration and expect it to work, the module you are trying to use expects a specific table structure which you don't have. You could just not use it and do the role checking manually though...

package MyApp; sub check_role { my ( $c, $role ) = @_; return 1 if ( $user && $c->user->obj->role eq $role ); return 0; } sub assert_role { my ( $c, $role ) = @_; if ( ! $c->check_role( $role ) ) { $c->detach( '/access_denied' ); } } package MyApp::Controller::Root; sub auto : Private { my ( $self, $c ) = @_; $c->stash->{ 'is_admin' } = $c->check_role( 'Admin' ); return 1; } package MyApp::Controller::Admin; sub auto : Private { my ( $self, $c ) = @_; $c->assert_role( 'Admin' ); return 1; }

We're not surrounded, we're in a target-rich environment!
  • Comment on Re: Catalyst::Plugin::Authorization -- dont have "role_rel" for one table
  • Download Code