From 74850f2906bbb3935065d28e3e22ac131766d6f2 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 9 Nov 2013 19:51:29 +0000 Subject: added possibility to approve users to ACL policies in installer --- install.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'install.php') 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){ + @@ -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"; } -- cgit v1.2.3