/**
  * {@inheritDoc}
  * @see IPluggableAccessManager::saveGroupAuthAssignment()
  */
 public function saveGroupAuthAssignment(IPluggableModule $module, IPluggableAccessGroupAssignment $assignment)
 {
     $role = $assignment->getAccessRole();
     if (!$role instanceof AccessRole) {
         $role = $this->getAuthItem($module, $assignment->getAccessRole()->getRoleName());
         if ($role === null) {
             return false;
         }
     }
     $criteria = new CDbCriteria();
     $criteria->with = array('accessRole', array('alias' => 'r'));
     $criteria->compare('r.module_name', $module->getId());
     $criteria->compare('access_role_id', $role->access_role_id);
     $criteria->compare('user_group_id', $assignment->getUserGroup()->getId());
     $aaa = AccessGroupAssignment::model()->find($criteria);
     if ($aaa === null) {
         $aaa = new AccessGroupAssignment();
         $aaa->access_role_id = $role->access_role_id;
         $aaa->user_group_id = $assignment->getUserGroup()->getId();
     }
     $aaa->biz_rule = $assignment->getBusinessRule();
     $aaa->setData($assignment->getData());
     return $aaa->save();
 }
 /**
  * {@inheritDoc}
  * @see IPluggableAccessManager::saveGroupAuthAssignment()
  */
 public function saveGroupAuthAssignment(IPluggableModule $module, IPluggableAccessGroupAssignment $assignment)
 {
     $authAssignment = new CAuthAssignment($this, $assignment->getAccessRole()->getRoleName(), $assignment->getUserProfile()->getId(), $assignment->getBusinessRule(), $assignment->getData());
     $this->_manager->saveAuthAssignment($authAssignment);
     return true;
 }