-
Notifications
You must be signed in to change notification settings - Fork 0
/
playground-matrix-resource.php
167 lines (161 loc) · 9.13 KB
/
playground-matrix-resource.php
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<?php
declare(strict_types=1);
return [
'about' => (bool) env('PLAYGROUND_MATRIX_RESOURCE_ABOUT', true),
'default_key' => env('PLAYGROUND_MATRIX_RESOURCE_DEFAULT_KEY', ''),
'middleware' => [
'default' => env('PLAYGROUND_MATRIX_RESOURCE_MIDDLEWARE_DEFAULT', ['web']),
'auth' => env('PLAYGROUND_MATRIX_RESOURCE_MIDDLEWARE_AUTH', ['web', 'auth']),
'guest' => env('PLAYGROUND_MATRIX_RESOURCE_MIDDLEWARE_GUEST', ['web']),
],
'policies' => [
Playground\Matrix\Models\Backlog::class => Playground\Matrix\Resource\Policies\BacklogPolicy::class,
Playground\Matrix\Models\Board::class => Playground\Matrix\Resource\Policies\BoardPolicy::class,
Playground\Matrix\Models\Epic::class => Playground\Matrix\Resource\Policies\EpicPolicy::class,
Playground\Matrix\Models\Flow::class => Playground\Matrix\Resource\Policies\FlowPolicy::class,
Playground\Matrix\Models\Milestone::class => Playground\Matrix\Resource\Policies\MilestonePolicy::class,
Playground\Matrix\Models\Note::class => Playground\Matrix\Resource\Policies\NotePolicy::class,
Playground\Matrix\Models\Project::class => Playground\Matrix\Resource\Policies\ProjectPolicy::class,
Playground\Matrix\Models\Release::class => Playground\Matrix\Resource\Policies\ReleasePolicy::class,
Playground\Matrix\Models\Roadmap::class => Playground\Matrix\Resource\Policies\RoadmapPolicy::class,
Playground\Matrix\Models\Source::class => Playground\Matrix\Resource\Policies\SourcePolicy::class,
Playground\Matrix\Models\Sprint::class => Playground\Matrix\Resource\Policies\SprintPolicy::class,
Playground\Matrix\Models\Tag::class => Playground\Matrix\Resource\Policies\TagPolicy::class,
Playground\Matrix\Models\Team::class => Playground\Matrix\Resource\Policies\TeamPolicy::class,
Playground\Matrix\Models\Ticket::class => Playground\Matrix\Resource\Policies\TicketPolicy::class,
Playground\Matrix\Models\Version::class => Playground\Matrix\Resource\Policies\VersionPolicy::class,
],
'load' => [
'policies' => (bool) env('PLAYGROUND_MATRIX_RESOURCE_LOAD_POLICIES', true),
'routes' => (bool) env('PLAYGROUND_MATRIX_RESOURCE_LOAD_ROUTES', true),
'views' => (bool) env('PLAYGROUND_MATRIX_RESOURCE_LOAD_VIEWS', true),
],
'routes' => [
'matrix' => (bool) env('PLAYGROUND_MATRIX_RESOURCE_ROUTES_MATRIX', true),
'backlogs' => (bool) env('PLAYGROUND_MATRIX_RESOURCE_ROUTES_BACKLOGS', true),
'boards' => (bool) env('PLAYGROUND_MATRIX_RESOURCE_ROUTES_BOARDS', true),
'epics' => (bool) env('PLAYGROUND_MATRIX_RESOURCE_ROUTES_EPICS', true),
'flows' => (bool) env('PLAYGROUND_MATRIX_RESOURCE_ROUTES_FLOWS', true),
'matrices' => (bool) env('PLAYGROUND_MATRIX_RESOURCE_ROUTES_MATRICES', true),
'milestones' => (bool) env('PLAYGROUND_MATRIX_RESOURCE_ROUTES_MILESTONES', true),
'notes' => (bool) env('PLAYGROUND_MATRIX_RESOURCE_ROUTES_NOTES', true),
'projects' => (bool) env('PLAYGROUND_MATRIX_RESOURCE_ROUTES_PROJECTS', true),
'releases' => (bool) env('PLAYGROUND_MATRIX_RESOURCE_ROUTES_RELEASES', true),
'roadmaps' => (bool) env('PLAYGROUND_MATRIX_RESOURCE_ROUTES_ROADMAPS', true),
'sources' => (bool) env('PLAYGROUND_MATRIX_RESOURCE_ROUTES_SOURCES', true),
'sprints' => (bool) env('PLAYGROUND_MATRIX_RESOURCE_ROUTES_SPRINTS', true),
'tags' => (bool) env('PLAYGROUND_MATRIX_RESOURCE_ROUTES_TAGS', true),
'teams' => (bool) env('PLAYGROUND_MATRIX_RESOURCE_ROUTES_TEAMS', true),
'tickets' => (bool) env('PLAYGROUND_MATRIX_RESOURCE_ROUTES_TICKETS', true),
'versions' => (bool) env('PLAYGROUND_MATRIX_RESOURCE_ROUTES_VERSIONS', true),
],
'sitemap' => [
'enable' => (bool) env('PLAYGROUND_MATRIX_RESOURCE_SITEMAP_ENABLE', true),
'guest' => (bool) env('PLAYGROUND_MATRIX_RESOURCE_SITEMAP_GUEST', true),
'user' => (bool) env('PLAYGROUND_MATRIX_RESOURCE_SITEMAP_USER', true),
'view' => env('PLAYGROUND_MATRIX_RESOURCE_SITEMAP_VIEW', 'playground-matrix-resource::sitemap'),
],
'blade' => env('PLAYGROUND_MATRIX_RESOURCE_BLADE', 'playground-matrix-resource::'),
'abilities' => [
'admin' => [
'playground-matrix-resource:*',
],
'manager' => [
'playground-matrix-resource:backlog:*',
'playground-matrix-resource:board:*',
'playground-matrix-resource:epic:*',
'playground-matrix-resource:flow:*',
'playground-matrix-resource:matrix:*',
'playground-matrix-resource:milestone:*',
'playground-matrix-resource:note:*',
'playground-matrix-resource:project:*',
'playground-matrix-resource:release:*',
'playground-matrix-resource:roadmap:*',
'playground-matrix-resource:source:*',
'playground-matrix-resource:sprint:*',
'playground-matrix-resource:tag:*',
'playground-matrix-resource:team:*',
'playground-matrix-resource:ticket:*',
'playground-matrix-resource:version:*',
],
'user' => [
'playground-matrix-resource:backlog:view',
'playground-matrix-resource:backlog:viewAny',
'playground-matrix-resource:board:view',
'playground-matrix-resource:board:viewAny',
'playground-matrix-resource:epic:view',
'playground-matrix-resource:epic:viewAny',
'playground-matrix-resource:flow:view',
'playground-matrix-resource:flow:viewAny',
'playground-matrix-resource:matrix:view',
'playground-matrix-resource:matrix:viewAny',
'playground-matrix-resource:milestone:view',
'playground-matrix-resource:milestone:viewAny',
'playground-matrix-resource:note:view',
'playground-matrix-resource:note:viewAny',
'playground-matrix-resource:project:view',
'playground-matrix-resource:project:viewAny',
'playground-matrix-resource:release:view',
'playground-matrix-resource:release:viewAny',
'playground-matrix-resource:roadmap:view',
'playground-matrix-resource:roadmap:viewAny',
'playground-matrix-resource:source:view',
'playground-matrix-resource:source:viewAny',
'playground-matrix-resource:sprint:view',
'playground-matrix-resource:sprint:viewAny',
'playground-matrix-resource:tag:view',
'playground-matrix-resource:tag:viewAny',
'playground-matrix-resource:team:view',
'playground-matrix-resource:team:viewAny',
'playground-matrix-resource:ticket:view',
'playground-matrix-resource:ticket:viewAny',
'playground-matrix-resource:ticket:create',
'playground-matrix-resource:ticket:edit',
'playground-matrix-resource:ticket:store',
'playground-matrix-resource:ticket:update',
'playground-matrix-resource:version:view',
'playground-matrix-resource:version:viewAny',
],
// 'guest' => [
// 'deny',
// ],
// 'guest' => [
// 'app:view',
// 'playground:view',
// 'playground-auth:logout',
// 'playground-auth:reset-password',
// 'playground-matrix-resource:backlog:view',
// 'playground-matrix-resource:backlog:viewAny',
// 'playground-matrix-resource:board:view',
// 'playground-matrix-resource:board:viewAny',
// 'playground-matrix-resource:epic:view',
// 'playground-matrix-resource:epic:viewAny',
// 'playground-matrix-resource:flow:view',
// 'playground-matrix-resource:flow:viewAny',
// 'playground-matrix-resource:matrix:view',
// 'playground-matrix-resource:matrix:viewAny',
// 'playground-matrix-resource:milestone:view',
// 'playground-matrix-resource:milestone:viewAny',
// 'playground-matrix-resource:note:view',
// 'playground-matrix-resource:note:viewAny',
// 'playground-matrix-resource:project:view',
// 'playground-matrix-resource:project:viewAny',
// 'playground-matrix-resource:release:view',
// 'playground-matrix-resource:release:viewAny',
// 'playground-matrix-resource:roadmap:view',
// 'playground-matrix-resource:roadmap:viewAny',
// 'playground-matrix-resource:source:view',
// 'playground-matrix-resource:source:viewAny',
// 'playground-matrix-resource:sprint:view',
// 'playground-matrix-resource:sprint:viewAny',
// 'playground-matrix-resource:tag:view',
// 'playground-matrix-resource:tag:viewAny',
// 'playground-matrix-resource:team:view',
// 'playground-matrix-resource:team:viewAny',
// 'playground-matrix-resource:ticket:view',
// 'playground-matrix-resource:ticket:viewAny',
// 'playground-matrix-resource:version:view',
// 'playground-matrix-resource:version:viewAny',
// ],
],
];