Pollenizer / CakePHP-Admin-Plugin

A CakePHP Plugin for sexier admin scaffolding using Twitter Bootstrap
http://pollenizer.com/
25 stars 6 forks source link

Issue with adminIsAuthorized() #1

Closed danielcosta closed 12 years ago

danielcosta commented 12 years ago

Hello, can you help me with the adminIsAuthorized() function?

At time of this function runtime we don't have session loaded on CakePHP, so I could not get the Auth->User('admin') param, at least on my tests.

How are you using this method to authorize based on session admin param?

Thank you.

danielcosta commented 12 years ago

By the way, I've put the adminIsAuthorized() function inside Config/boostrap of the plugin itself, and i'm checking if the Auth::User('admin') param is true.

You can check in my fork, I think I'll use this way unless you suggest me a best solution like your README suggest. If you think my solution is good, I can make a pull request to your main repo.

Thanks!

robertlove commented 12 years ago

Hi danielcosta

I'm glad you've been able to make the plugin work for your purposes. However, I wouldn't want the plugin to enforce the requirement for a specific param as you're suggesting. As you can see, the plugin, by default, doesn't require authorisation at all, let alone the use of the Auth component.

Cheers, Robert