Have you heard of something called ACL?

Cheers,
mbavio

On Jun 2, 11:11 am, Jaime <[EMAIL PROTECTED]> wrote:
> On 4 mayo, 17:02, baur79 <[EMAIL PROTECTED]> wrote:
>
>
>
> > i have model "contract" and
> > 3 types of users  manager / lawyer / broker
>
> > each of them have different privileges on this model
>
> > for example:
> > manager can only edit several fields
> > lawyer can do everything on model
> > broker can only see and send to by email for review
>
> > I think that is not possible to do in one app (even with prefix
> > routing)
> > so try to do this in different apps
> > manager.site.com
> > lawyer.site.com
> > broker.site.com
>
> > please if you can suggest me easy way, i will be glad for that
>
> I'm stuck with the same problem.
>
> One database, many models and different user roles (and therefore
> different priviledges).
>
> The only solution that cames to mi mind is something like:
>
> class contract_controller extends AppController {
>
>   function edit($id) {
>
>     if ($role == 'LAYWER') {
>       $this->_edit_contract_by_laywer($id);
>       $this->render('edit_contract_by_lawyer');
>     }
>     elseif ($role == 'BROKWER') {
>       $this->_edit_contract_by_broker($id);
>       $this->render('edit_contract_by_broker');
>     }
>     elseif ($role == 'MANAGER') {
>       $this->_edit_contract_by_manager($id);
>       $this->render('edit_contract_by_manager');
>     }
>
>   }
>
> }
>
> And then define multiple  private methods like:
> * _edit_contract_by_manager()
> * _edit_contract_by_lawyer()
> * _edit_contract_by_broker()
>
> And their corresponding views.
>
> But this is LAME, very LAME. I'm sure there are better solutions.
>
> Any guru out there?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to