public function add(EntityInterface $user)
    {
        if (!is_a($user, self::ACCESS_ENTITY_TYPE)) {
            throw new Exception('The given entity (' . get_class($user) . ') is not compatible with this data source (' . self::class . '.');
        }
        
        // If the username already is used we cannot add a new user
        if ($this->accessControlManager->hasAccessEntityForName(self::ACCESS_ENTITY_TYPE, $user->getName())) {
            throw new Exception('Cannot add the user. Username is already in use.');
        }
        
        // Add the access entity
        $uuid = $this->accessControlManager->addAccessEntity($user);
        
        if ($uuid === false) {
            throw new Exception('Cannot add the user. Internal software error.');
        }
        
        return $user;
    }