---
title: "WarmupPermissionGuard"
manual: "Warming"
version: "5.3"
permalink: "https://docs.typo3.org/permalink/eliashaeussler/typo3-warming:warmup-permission-guard@5.3"
source: "DeveloperCorner/WarmupPermissionGuard.rst"
rendered: "2026-11-05T08:37:00+00:00"
---

# `WarmupPermissionGuard` {#warmup-permission-guard}

The `WarmupPermissionsGuard` can be used to determine
[permissions](https://docs.typo3.org/permalink/eliashaeussler/typo3-warming:permissions@5.3) of a given backend user to warm up caches
of specific sites or pages.

> [!NOTE]
> Resolved permissions for a given combination of page/site, language id and
> backend user are cached during runtime.

-   **class WarmupPermissionGuard**

    -   *Fully qualified name:* `\EliasHaeussler\Typo3Warming\Security\WarmupPermissionGuard`

    Guard to determine cache warmup permissions.

    -   **canWarmupCacheOfPage($pageId, $context)**

        Check if caches of the given page can be warmed up while respecting given
        permission context.

        -   *param int $pageId:* ID of the page to be checked.
        -   *param \\EliasHaeussler\\Typo3Warming\\Security\\Context\\PermissionContext $context:* Permission context which holds language ID and backend user.
        -   *returntype:* `bool`

    -   **canWarmupCacheOfSite($site, $context)**

        Check if caches of the given site can be warmed up while respecting given
        permission context.

        -   *param \\TYPO3\\CMS\\Core\\Site\\Entity\\Site $site:* The site to be checked.
        -   *param \\EliasHaeussler\\Typo3Warming\\Security\\Context\\PermissionContext $context:* Permission context which holds language ID and backend user.
        -   *returntype:* `bool`

> [!NOTE]
> **See also**
>
> View the sources on GitHub:
>
> -   [WarmupPermissionGuard](https://github.com/eliashaeussler/typo3-warming/blob/main/Classes/Security/WarmupPermissionGuard.php)
> -   [PermissionContext](https://github.com/eliashaeussler/typo3-warming/blob/main/Classes/Security/Context/PermissionContext.php)
