/** * {@inheritDoc} * @see IPluggableAccessManager::getGroupAuthAssignment() */ public function getGroupAuthAssignment(IPluggableModule $module, IPluggableAccessRole $item, IPluggableUserGroup $group) { $criteria = new CDbCriteria(); $criteria->with = array('accessRole', array('alias' => 'r')); $criteria->compare('r.module_name', $module->getId()); $criteria->compare('r.role_name', $item->getRoleName()); $criteria->compare('user_group_id', $group->getId()); return AccessGroupAssignment::model()->find($criteria); }
/** * Gets the composed name of the module/item * * @param IPluggableModule $module * @param IPluggableAccessRole $item * @return string */ protected function getItemName(IPluggableModule $module, IPluggableAccessRole $item) { return $module->getId() . '::' . $item->getRoleName(); }