acl.global.php 2.72 KB
Newer Older
1
<?php
2
3
/**
 * gredu_labs
Aspasia Katsi's avatar
Aspasia Katsi committed
4
 *
5
6
7
8
 * @link https://github.com/eellak/gredu_labs for the canonical source repository
 * @copyright Copyright (c) 2008-2015 Greek Free/Open Source Software Society (https://gfoss.ellak.gr/)
 * @license GNU GPLv3 http://www.gnu.org/licenses/gpl-3.0-standalone.html
 */
9
10
11
return [
    'acl' => [
        'default_role' => 'guest',
12
13
14
        'roles' => [
            'guest' => [],
            'user' => [],
15
            'school' => ['user'],
16
            'admin' => ['user'],
17
18
        ],
        'resoures' => [],
19
        'guards' => [
20
21
            'resources' => [],
            'callables' => [],
22
            'routes' => [
23
                ['/', ['guest', 'user'], ['get']],
kanellov's avatar
kanellov committed
24
                ['/about', ['guest', 'user'], ['get']],
Vassilis Kanellopoulos's avatar
Vassilis Kanellopoulos committed
25
                ['/school', ['school'], ['get']],
Vassilis Kanellopoulos's avatar
Vassilis Kanellopoulos committed
26
                ['/school/labs', ['school'], ['get', 'post', 'delete']],
Vassilis Kanellopoulos's avatar
Vassilis Kanellopoulos committed
27
28
29
                ['/school/staff', ['school'], ['get', 'post', 'delete']],
                ['/school/assets', ['school'], ['get', 'post', 'delete']],
                ['/school/labs/attachment', ['school'], ['get', 'delete']],
Vassilis Kanellopoulos's avatar
Vassilis Kanellopoulos committed
30
                ['/school/software', ['school'], ['get', 'post', 'delete']],
31
                ['/application-form', ['school'], ['get', 'post']],
32
                ['/application-form/submit-success', ['school'], ['get']],
33
                ['/application-form/report', ['school'], ['get']],
34
                ['/application-form/approved', ['guest'], ['get']],
35
                ['/receive-equip', ['school'], ['get', 'post'], GrEduLabs\ReceiveEquip\Acl\Assertion\CanSubmit::class],
36
37
                ['/receive-equip/submit-success', ['school'], ['get']],
                ['/receive-equip/report', ['school'], ['get']],
38
                ['/receive-equip/receive-doc/{fn}', ['school'], ['get']],
39
                ['/tpe_survey', ['school'], ['get', 'post']],
40
                ['/tpe_survey/total-teachers', ['school'], ['post']],
41
                ['/forum', ['guest', 'user'], ['get']],
Vassilis Kanellopoulos's avatar
Vassilis Kanellopoulos committed
42
                ['/sch_sync/sync', ['school'], ['get']],
43
                ['/in_numbers', ['guest', 'user'], ['get']],
Vassilis Kanellopoulos's avatar
Vassilis Kanellopoulos committed
44
                ['/export/csv/edulabs_{type}.csv', ['guest', 'user'], ['get']],
Vassilis Kanellopoulos's avatar
Vassilis Kanellopoulos committed
45
                ['/open-data', ['guest', 'user'], ['get']],
Aspasia Katsi's avatar
Aspasia Katsi committed
46
47
48
49
50
                ['/university-form', ['guest'], ['get', 'post']],
                ['/university-form/submit-success',['guest'],['get']],
                ['/teacher-form', ['guest'], ['get', 'post']],
                ['/teacher-form/submit-success',['guest'], ['get','post']],
                ['/teacher-form/mm',['guest'], ['get']],
51
                ['/admin', ['admin'], ['get']],
52
53
                ['/admin/university-form/display', ['admin'], ['get']],
                ['/admin/teacher-form/display', ['admin'], ['get']],
54
55
56
57
            ],
        ],
    ],
];