lugnsk/micro

View on GitHub
app/configs/components/auth.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

// Roles
return [
    'class' => '\Micro\Auth\DbAcl',
    'arguments' => [
        'container' => '@this',
        'roles' => [ // Permission roles
            'roles' => [
                1 => 'user',
                2 => 'admin'
            ],
            'perms' => [
                1 => 'news_read',
                2 => 'news_create',
                3 => 'news_edit'
            ],
            'role_perms' => [
                1 => [2, 3]
            ]
        ]
    ]
];