[Catalyst] ACL Error: deny_access_unless

Tomas Doran bobtfish at bobtfish.net
Wed Jun 3 01:11:11 GMT 2009


On 30 May 2009, at 23:17, Gordon Stewart wrote:

> Tom
>
>> I tried to fix this, but something in the dependency stack of
>> DBIx::Class::HTMLWidget fails to install for me.
>
> I have removed this

Ok, that wasn't much better:

, Makefile.PL in your tarball is still fucked (i.e. missing most of  
your dependencies).

.  The config you've shipped with the app is pointed at your local  
mysql, not at sqlite.

. Your password credential config is asking for cleartext passwords,  
but the passwords in the sqlite DB (which is what the app was  
configured for) was encrypted.

. There are failing tests which aren't ever going to pass, like t/ 
controller_Admin.t which checks for /admin without logging in..

. The tests in t/live_app01.t fail incorrectly, and don't actually  
test the issue you described.

I have fixed all of this and got your app working, but I can't  
reproduce the bug you originally described.

http://omni.state51.co.uk/~t0m/MyApp.tgz - there is your tarball  
back, with git history of everything I did for your perusal.

However, I think I may have guessed what your issue is.. Going back  
to your original email:

> The access control section:
>
> __PACKAGE__->deny_access_unless( "/admin/user", [ 'Admin' ] );

And in your template, you had:

 > User has admin : <% $c->check_user_roles('Admin') %><br>

However, your sqlite DB looked like this:

sqlite3 myapp.db
SQLite version 3.6.11
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> select * from roles;
1|user
2|admin
sqlite>

The cases don't match, and I had to correct these before things would  
work.

Do you have a real issue which you can replicate by flicking  
backwards and forwards between Catalyst 5.80 and 5.70, or did you  
just break things around the same time as upgrading?

I am happy to help out if their is a genuine bug here, but given I'm  
having to wade in and make loads of changes to any code you give me  
to make it work at all, I'm not confident you're not just getting  
yourself confused, or that I haven't stomped on your bug on the way  
past.

If there is still an issue, please try for a *working*, *self  
contained* app, with *correct dependencies* and tests which *fail on  
5.80 and pass on 5.7X*.

Cheers
t0m




More information about the Catalyst mailing list