-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathauthorization.global.php.dist
65 lines (59 loc) · 1.8 KB
/
authorization.global.php.dist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
return [
'dot_authorization' => [
//name of the guest role to use if no identity is provided
'guest_role' => 'guest',
'role_provider_manager' => [],
//example for a flat RBAC model using the InMemoryRoleProvider
'role_provider' => [
'type' => 'InMemory',
'options' => [
'roles' => [
'admin' => [
'permissions' => [
'edit',
'delete',
//etc..
]
],
'user' => [
'permissions' => [
//...
]
]
]
],
],
//example for a hierarchical model, less to write but it can be confusing sometimes
/*'role_provider' => [
'type' => 'InMemory',
'options' => [
'roles' => [
'admin' => [
'children' => ['user'],
'permissions' => ['create', 'delete']
],
'user' => [
'children' => ['guest']
'permissions' => ['edit']
]
'guest' => [
'permissions' => ['view']
]
]
]
],*/
'assertion_manager' => [
'factories' => [
//EditAssertion::class => InvokableFactory::class,
],
],
'assertions' => [
[
'type' => EditAssertion::class,
'permissions' => ['edit'],
'options' => []
]
]
]
];