docs: protected void checkPermissions(
          CmsDbContext dbc,
          CmsResource resource,
          CmsPermissionSet requiredPermissions,
          boolean checkLock,
          CmsResourceFilter filter)
      throws CmsException, CmsSecurityException {
  
          // get the permissions
          I_CmsPermissionHandler.CmsPermissionCheckResult permissions = hasPermissions(
              dbc,
              resource,
              requiredPermissions,
              checkLock,
              filter);
          if (!permissions.isAllowed()) {
              checkPermissions(dbc.getRequestContext(), resource, requiredPermissions, permissions);
          }
      }