Sorry for my late answer

Solution:

add to my /lib/form/doctrine/myclassFrom.class.php

$this->widgetSchema['contractor_id
']->setOption('table_method','getContractorByCredentials');

and to /lib/model/doctrine/contractorTable.class.php

for example

public function getContractorByCredentials()
    {
        $sf_user = sfContext::getInstance()->getUser();
        if ($sf_user->hasCredential('manager'))
        {
              $q = Doctrine_Core::getTable('contractor')
              ->createQuery('a')
              ->where('a.usertype = \'manager\'')
              ->execute();
              return $q;
        } else return null;
    }






2010/10/13 omar <omar.jeb...@gmail.com>

> can u post your solution to help others pls?
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com<symfony-users%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to