-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathconfiguration.php
More file actions
113 lines (85 loc) · 2.56 KB
/
configuration.php
File metadata and controls
113 lines (85 loc) · 2.56 KB
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
<?php
/** @var \Icinga\Application\Modules\Module $this */
$section = $this->menuSection(N_('Oidc'), [
'permission' => 'oidc',
'url' => 'oidc/providers',
'icon' => 'img/oidc/openid32.png',
'priority' => 910
]);
?>
<?php
$this->provideConfigTab('backend', array(
'title' => $this->translate('Configure the database backend'),
'label' => $this->translate('Backend'),
'url' => 'config/backend'
));
$this->provideConfigTab('importbackend', array(
'title' => $this->translate('Configure the database backend'),
'label' => $this->translate('Import Backend'),
'url' => 'config/import-backend'
));
?>
<?php
$section->add(N_('Provider'))
->setUrl('oidc/providers')
->setPermission('oidc/provider')
->setPriority(10);
$this->providePermission(
'oidc/filter/providers',
$this->translate('Allow only access access to the Providers that match the filter')
);
$this->provideRestriction(
'oidc/filter/providers',
$this->translate('Restrict access to the Providers that match the filter')
);
$section->add(N_('User'))
->setUrl('oidc/users?sort=ctime desc')
->setPermission('oidc/user')
->setPriority(20);
$section->add(N_('Group'))
->setUrl('oidc/groups')
->setPermission('oidc/group')
->setPriority(30);
?>
<?php
$section->add(N_('Files'))
->setUrl('oidc/file')
->setPermission('oidc/file')
->setPriority(30);
if(count($this->getConfig('userbackends')->keys()) > 0){
$section->add(N_('Import'))
->setUrl('oidc/import/list')
->setPermission('oidc/import')
->setPriority(40);
}
$this->providePermission(
'oidc/file',
$this->translate('Allow the user to list files')
);
$this->providePermission(
'oidc/file/upload',
$this->translate('Allow uploading files')
);
$this->providePermission(
'oidc/file/view',
$this->translate('Allow viewing files')
);
$this->providePermission(
'oidc/file/download',
$this->translate('Allow download files')
);
$this->providePermission(
'oidc/file/delete',
$this->translate('Allow deleting files')
);
$this->providePermission(
'config/oidc',
$this->translate('Allow to configure the module')
);
$this->providePermission(
'oidc/import',
$this->translate('Allow to use import functionality')
);
$this->provideUserBackend('oidc',\Icinga\Module\Oidc\Backend\OidcUserBackend::class);
$this->provideUserGroupBackend('oidc',\Icinga\Module\Oidc\Backend\OidcUserGroupBackend::class);
?>