Skip to content

1.1.0

Compare
Choose a tag to compare
@distantnative distantnative released this 05 Sep 20:22
· 58 commits to main since this release
66abd20

Features

Support for field method aliases #33

{
  "query": "site.description.kt"
}

New option to switch off authentication for KQL

<?php 

return [
  'kql' => [
    'auth' => false
  ]
];

Allow and block lists for custom methods and classes

<?php

return [
  'kql' => [
    'classes' => [
      'blocked' => [
        'Kirby\Cms\User'
      ]
    ],
    'methods' => [
      'allowed' => [
        'AlbumPage::cover'
      ],
      'blocked' => [
        'Kirby\Cms\App::version'
      ]
    ]
  ]
];

You can also use doc block comments in custom model methods, custom page methods, etc. to allow a method in KQL

class AlbumPage extends Page
{
  /**
   * @kql-allowed
   */
  public function cover()
  {
    return $this->images()->findBy('name', 'cover') ?? $this->image();
  }
}

Custom interceptor support

<?php

return [
  'kql' => [
    'interceptors' => [
      'Kirby\Cms\System' => 'SystemInterceptor'
    ]
  ]
];

New collection shortcut

{
  "query": "collection('notes')"
}

Enhancements

Fixes

  • Fixed pagination issue #28
  • Throw proper permission exception in interceptors
  • Fixed issue in license
  • Fixed test setup in sandbox