diff options
author | Anika Henke <anika@selfthinker.org> | 2013-11-09 19:51:29 +0000 |
---|---|---|
committer | Anika Henke <anika@selfthinker.org> | 2013-11-09 19:51:29 +0000 |
commit | 74850f2906bbb3935065d28e3e22ac131766d6f2 (patch) | |
tree | 8b75e034f6df39c44e74c6cc7839a16d2f3ea2dc | |
parent | b4304655d0b09ba0a958b9cf56f1bf699cf05b84 (diff) | |
download | rpg-74850f2906bbb3935065d28e3e22ac131766d6f2.tar.gz rpg-74850f2906bbb3935065d28e3e22ac131766d6f2.tar.bz2 |
added possibility to approve users to ACL policies in installer
-rw-r--r-- | inc/lang/en/lang.php | 1 | ||||
-rw-r--r-- | install.php | 12 |
2 files changed, 10 insertions, 3 deletions
diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php index ab84c67f3..c6bb0aa2d 100644 --- a/inc/lang/en/lang.php +++ b/inc/lang/en/lang.php @@ -315,6 +315,7 @@ $lang['i_policy'] = 'Initial ACL policy'; $lang['i_pol0'] = 'Open Wiki (read, write, upload for everyone)'; $lang['i_pol1'] = 'Public Wiki (read for everyone, write and upload for registered users)'; $lang['i_pol2'] = 'Closed Wiki (read, write, upload for registered users only)'; +$lang['i_policyapprove'] = 'Registered users need to be approved before allowing access (to a Public or Closed Wiki)'; $lang['i_retry'] = 'Retry'; $lang['i_license'] = 'Please choose the license you want to put your content under:'; $lang['i_license_none'] = 'Do not show any license information'; 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"; } |