<?php
/**
 * @version     $Id$
 * @category	Nooku
 * @package     Nooku_Server
 * @subpackage  Users
 * @copyright   Copyright (C) 2011 Timble CVBA and Contributors. (http://www.timble.net).
 * @license     GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link        http://www.nooku.org
 */

/**
 * User Controller Executable Behavior 
 *
 * @author      Johan Janssens <http://nooku.assembla.com/profile/johanjanssens>
 * @category	Nooku
 * @package     Nooku_Server
 * @subpackage  Users
 */
class ComUsersControllerBehaviorExecutable extends ComDefaultControllerBehaviorExecutable
{  
    public function canLogout()
    {
        $userid = JFactory::getUser()->id;
        
        //Allow logging out ourselves
        if($this->getModel()->getState()->id === $userid) {
             return true;
        }
        
        if(JFactory::getUser()->get('gid') > 24) {
            return true;
        }
        
        return false;
    }
}
<?php
/**
 * @version     $Id$
 * @category	Nooku
 * @package     Nooku_Server
 * @subpackage  Users
 * @copyright   Copyright (C) 2011 Timble CVBA and Contributors. (http://www.timble.net).
 * @license     GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link        http://www.nooku.org
 */

/**
 * User Controller Executable Behavior 
 *
 * @author      Johan Janssens <http://nooku.assembla.com/profile/johanjanssens>
 * @category	Nooku
 * @package     Nooku_Server
 * @subpackage  Users
 */
class ComUsersControllerBehaviorExecutable extends ComDefaultControllerBehaviorExecutable
{  
    public function canLogout()
    {
        $user = JFactory::getUser();
        
        //Allow logging out ourselves
        if($this->getModel()->id == $user->get('id')) {
             return true;
        }
        
        if($user->get('gid') > 24) {
            return true;
        }
        
        return false;
    }
}
Fix bug: Users with group below super administrator are unable to logout.
Fix bug: Users with group below super administrator are unable to logout.
