private function updatePermission(Permission $permission, $permissionData)
    {
        $permission->setContext($permissionData['context']);

        $permission->setPermissions(
            $this->get('sulu_security.mask_converter')
                ->convertPermissionsToNumber($permissionData['permissions'])
        );

        return true;
    }