fobiaweb/auth

v0.1.0 2014-07-27 00:18 UTC

README

php Fobia Auth Component

Файл прав доступа

access.php

return array(
    1 => array(
        'list' => array(
            'ACCESS_1',
            'ACCESS_2'
        ),
        'value' => array(
            'ACCESS_3' => 11
        )
    ),
    2 => array(
        'list' => array(
            'ACCESS_1',
            'ACCESS_2'
        ),
        'value' => array(
            'ACCESS_3' => 11
        )
    )
);

ADMIN OVERRIDE

Сгенерировать таблицу:

$n = $i = 1;
while (strlen((string) $i) <= 9) {
    echo sprintf("| %-4d | %-9d | %b | \n", $n, $i, $i);
    $i = $i * 2;
    $n = $n + 1;
}
Numb Name Int Bin
1 root 1 1
2 2 10
3 override 4 100
4 8 1000
5 admin 16 10000
6 user 32 100000
7 library 64 1000000
8 128 10000000
9 256 100000000
10 512 1000000000
11 1024 10000000000
12 2048 100000000000
13 4096 1000000000000
14 8192 10000000000000
15 16384 100000000000000
16 32768 1000000000000000
17 65536 10000000000000000
18 131072 100000000000000000
19 262144 1000000000000000000
20 524288 10000000000000000000
21 1048576 100000000000000000000
22 2097152 1000000000000000000000
23 4194304 10000000000000000000000
24 8388608 100000000000000000000000
25 16777216 1000000000000000000000000
26 33554432 10000000000000000000000000
27 67108864 100000000000000000000000000
28 134217728 1000000000000000000000000000
29 268435456 10000000000000000000000000000
30 536870912 100000000000000000000000000000