git.cweiske.de
/
phancap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
aff10bd
)
add setup check for access rights
author
Christian Weiske
<cweiske@cweiske.de>
Wed, 9 Apr 2014 18:47:16 +0000
(20:47 +0200)
committer
Christian Weiske
<cweiske@cweiske.de>
Wed, 9 Apr 2014 18:47:16 +0000
(20:47 +0200)
www/setup.php
patch
|
blob
|
history
diff --git
a/www/setup.php
b/www/setup.php
index 747699a3d283c59beca204d245ddd774424a1eaf..d89cf18ab97edc098b175768a944ed98cfaba098 100644
(file)
--- a/
www/setup.php
+++ b/
www/setup.php
@@
-17,7
+17,18
@@
$messages = array();
$config = new Config();
try {
$config->load();
$config = new Config();
try {
$config->load();
- $messages[][] = array('ok', 'Configuration check ok');
+ $messages[][] = array('ok', 'Base configuration is ok');
+
+ if ($config->access === true) {
+ $messages[][] = array('ok', 'Everyone may access the API');
+ } else if ($config->access === false) {
+ $messages[][] = array('err', 'API access is disabled');
+ } else {
+ $messages[][] = array(
+ 'ok',
+ count($config->access) . ' users may access the API'
+ );
+ }
} catch (\Exception $e) {
$messages[][] = array('err', $e->getMessage());
}
} catch (\Exception $e) {
$messages[][] = array('err', $e->getMessage());
}
@@
-53,7
+64,7
@@
$out = <<<HTM
content: '✔';
color: green;
padding: 0 0.5ex;
content: '✔';
color: green;
padding: 0 0.5ex;
- margin-right:
1
ex;
+ margin-right:
0.5
ex;
}
li.err:before {
content: "✘";
}
li.err:before {
content: "✘";