Merge pull request #70 from Philosoft/patch-2

Allow parent-child relationship to permissions
This commit is contained in:
Antonio Ramirez
2017-09-12 23:19:00 +02:00
committed by GitHub
2 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@
## 1.0.14 - Work in progress
- Enh #65: Updated Romanian translation (mrbig00)
- Enh #61: Updated Russian translation (faenir)
- Enh #70: Allow permission-permission parent-child relationship
## 1.0.13 - August 12, 2017
- Fix #49: Fix wrong call of method make() for set attributes (MKiselev)

View File

@ -99,7 +99,7 @@ class AuthHelper
public function getUnassignedItems(AbstractAuthItem $model)
{
$excludeItems = $model->item !== null ? [$model->item->name] : [];
$type = $model->getType() == Permission::TYPE_PERMISSION ?: null;
$type = $model->getType() == Permission::TYPE_PERMISSION ? Permission::TYPE_PERMISSION : null;
$items = $this->getAuthManager()->getItems($type, $excludeItems);
return ArrayHelper::map(