logo       

Re: Is this a bad idea? What do you think?: msg#00005

php.zend.framework.auth

Subject: Re: Is this a bad idea? What do you think?

I'm glad you pointed that out, I will be using views from other
controllers and mixing them. I'm glad you stopped me in my tracks.

Many thanks.

On 10/1/07, Jack Sleight <jack.sleight-Re5JQEeQqe8AvxtiuMwx3w@xxxxxxxxxxxxxxxx>
wrote:
> This was the approach I was originally going to take, however you run
> into a problem if you want to customise your views based on what
> resources a user has permission to access, because the permissions for
> all controllers will not be known. If you don't want to do that, or you
> only want to customise views within the same controller then I think
> that approach would be fine. But that's just my opinion, and I'm no expert.
>
> Douglas Hammond wrote:
> > To help with auth and acl I made an action helper that automatically
> > checks permissions on preDipatch.
> >
> > My question is would it be bad practice to setup the acl for that
> > controller in the init like this:
> >
> > public function init()
> > {
> > $acl = $this->_helper->getHelper('Auth')->getAcl();
> >
> > $acl->add(new Zend_Acl_Resource('default'));
> > $acl->add(new Zend_Acl_Resource('default.error'), 'default');
> > $acl->add(new Zend_Acl_Resource('default.index'), 'default');
> > $acl->allow('guest', 'default');
> >
> > }
> >
> > This makes it simple for me to manage the acl on a per controller basis
> > or should I stick all the acl controls in my custom acl class?
> >
> >
>
> --
> Jack
>



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise