summaryrefslogtreecommitdiff
path: root/install.php
diff options
context:
space:
mode:
authorAnika Henke <anika@selfthinker.org>2013-11-09 19:51:29 +0000
committerAnika Henke <anika@selfthinker.org>2013-11-09 19:51:29 +0000
commit74850f2906bbb3935065d28e3e22ac131766d6f2 (patch)
tree8b75e034f6df39c44e74c6cc7839a16d2f3ea2dc /install.php
parentb4304655d0b09ba0a958b9cf56f1bf699cf05b84 (diff)
downloadrpg-74850f2906bbb3935065d28e3e22ac131766d6f2.tar.gz
rpg-74850f2906bbb3935065d28e3e22ac131766d6f2.tar.bz2
added possibility to approve users to ACL policies in installer
Diffstat (limited to 'install.php')
-rw-r--r--install.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/install.php b/install.php
index 82a47b037..fd006d566 100644
--- a/install.php
+++ b/install.php
@@ -207,6 +207,10 @@ function print_form($d){
<option value="2" <?php echo ($d['policy'] == 2)?'selected="selected"':'' ?>><?php echo $lang['i_pol2']?></option>
</select>
+ <label for="approve">
+ <input type="checkbox" name="d[approve]" id="approve" <?php echo(($d['approve'] ? ' checked="checked"' : ''));?> />
+ <?php echo $lang['i_policyapprove']?>
+ </label>
</fieldset>
</fieldset>
@@ -270,6 +274,7 @@ function check_data(&$d){
'password' => '',
'confirm' => '',
'policy' => '0',
+ 'approve' => '0',
'license' => 'cc-by-sa'
);
global $lang;
@@ -332,6 +337,7 @@ function store_data($d){
global $LC;
$ok = true;
$d['policy'] = (int) $d['policy'];
+ $usergroup = $d['approve'] ? 'member' : 'user';
// create local.php
$now = gmdate('r');
@@ -360,7 +366,7 @@ EOT;
// create users.auth.php
// --- user:SMD5password:Real Name:email:groups,comma,seperated
- $output = join(":",array($d['superuser'], $pass, $d['fullname'], $d['email'], 'admin,user'));
+ $output = join(":",array($d['superuser'], $pass, $d['fullname'], $d['email'], 'admin,'.$usergroup));
$output = @file_get_contents(DOKU_CONF.'users.auth.php.dist')."\n$output\n";
$ok = $ok && fileWrite(DOKU_LOCAL.'users.auth.php', $output);
@@ -378,10 +384,10 @@ EOT;
EOT;
if($d['policy'] == 2){
$output .= "* @ALL 0\n";
- $output .= "* @user 8\n";
+ $output .= "* @".$usergroup." 8\n";
}elseif($d['policy'] == 1){
$output .= "* @ALL 1\n";
- $output .= "* @user 8\n";
+ $output .= "* @".$usergroup." 8\n";
}else{
$output .= "* @ALL 8\n";
}