Skip to content

Feature Flags ​

You can force-enable or disable parts of the backend with TinyAuthBackend.features. This is useful when you only want the classic TinyAuth adapter functionality exposed in the UI.

php
'TinyAuthBackend' => [
    'features' => [
        'allow' => true,
        'acl' => true,
        'roles' => true,
        'resources' => false,
        'scopes' => false,
    ],
],

Known feature keys ​

KeySectionManages
allowAllow (Public Actions)Actions reachable without authentication
aclACL MatrixController/action role permissions
rolesRolesRole aliases, ordering, and hierarchy
resourcesResourcesEntity-level abilities
scopesScopesReusable field-comparison conditions

A disabled feature is hidden from navigation. Its controller remains reachable by URL. Feature flags do not enforce authorization; the admin gate still protects every backend section.

Adapter-only setups

For a classic TinyAuth setup that only stores allow and acl in the database, disable resources and scopes, see the Adapter-Only strategy.

Inspecting flags at runtime ​

The FeatureService resolves which sections are enabled and builds the navigation:

php
use TinyAuthBackend\Service\FeatureService;

$service = new FeatureService();
$enabled = $service->isEnabled('resources');
$items = $service->getNavigationItems();

Released under the MIT License.