/**
  * @return User_ForgeUserGroupPermission[]
  */
 public function getPermissionsForForgeUserGroup(User_ForgeUGroup $user_group)
 {
     $permissions = array();
     $user_group_id = $user_group->getId();
     $rows = $this->permissions_dao->getPermissionsForForgeUGroup($user_group_id);
     if (!$rows) {
         return $permissions;
     }
     foreach ($rows as $row) {
         $permissions[$row['permission_id']] = $this->instantiateFromRow($row);
     }
     return array_values($permissions);
 }
 /**
  * @return bool
  */
 public function doesUserHavePermission(PFUser $user, User_ForgeUserGroupPermission $permission)
 {
     return $this->permissions_dao->doesUserHavePermission($user->getId(), $permission->getId());
 }