forked from extern/egroupware
Move peer server config; add option to set default expiration for auto-created accounts
This commit is contained in:
parent
5d7c74b89d
commit
985fc8292c
@ -29,7 +29,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="{row_off}">
|
||||
<tr bgcolor="{row_on}">
|
||||
<td>{lang_Select_where_you_want_to_store/retrieve_user_accounts}:</td>
|
||||
<td>
|
||||
<select name="newsettings[account_repository]">
|
||||
@ -49,7 +49,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="{row_off}">
|
||||
<tr bgcolor="{row_on}">
|
||||
<td>{lang_Minimum_account_id_(e.g._500_or_100,_etc.)}:</td>
|
||||
<td><input name="newsettings[account_min_id]" value="{value_account_min_id}"></td>
|
||||
</tr>
|
||||
@ -58,12 +58,12 @@
|
||||
<td><input name="newsettings[account_max_id]" value="{value_account_max_id}"></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="{row_off}">
|
||||
<tr bgcolor="{row_on}">
|
||||
<td>{lang_If_using_LDAP,_do_you_want_to_manage_homedirectory_and_loginshell_attributes?}:</td>
|
||||
<td>
|
||||
<select name="newsettings[ldap_extra_attributes]">
|
||||
<option value="">No</option>
|
||||
<option value="True"{selected_ldap_extra_attributes_True}>Yes</option>
|
||||
<option value="">{lang_No}</option>
|
||||
<option value="True"{selected_ldap_extra_attributes_True}>{lang_Yes}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@ -73,7 +73,7 @@
|
||||
<td><input name="newsettings[ldap_account_home]" value="{value_ldap_account_home}"></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="{row_off}">
|
||||
<tr bgcolor="{row_on}">
|
||||
<td> {lang_LDAP_Default_shell_(e.g._/bin/bash)}:</td>
|
||||
<td><input name="newsettings[ldap_account_shell]" value="{value_ldap_account_shell}"></td>
|
||||
</tr>
|
||||
@ -82,23 +82,35 @@
|
||||
<td>{lang_Auto_create_account_records_for_authenticated_users}:</td>
|
||||
<td>
|
||||
<select name="newsettings[auto_create_acct]">
|
||||
<option value="">No</option>
|
||||
<option value="True"{selected_auto_create_acct_True}>Yes</option>
|
||||
<option value="">{lang_No}</option>
|
||||
<option value="True"{selected_auto_create_acct_True}>{lang_Yes}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="{row_on}">
|
||||
<td>{lang_Auto-created_user_accounts_expire}:</td>
|
||||
<td>
|
||||
<select name="newsettings[auto_create_expire]">
|
||||
<option value="604800"{selected_auto_create_expire_604800}>{lang_one_week}</option>
|
||||
<option value="1209600"{selected_auto_create_expire_1209600}>{lang_two_weeks}</option>
|
||||
<option value="2592000"{selected_auto_create_expire_2592000}>{lang_one_month}</option>
|
||||
<option value="never"{selected_auto_create_expire_never}>{lang_Never}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="{row_off}">
|
||||
<td>{lang_Add_auto-created_users_to_this_group_('Default'_will_be_attempted_if_this_is_empty.)}:</td>
|
||||
<td><input name="newsettings[default_group_lid]" value="{value_default_group_lid}"></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="{row_off}">
|
||||
<tr bgcolor="{row_on}">
|
||||
<td>{lang_If_no_ACL_records_for_user_or_any_group_the_user_is_a_member_of}:</td>
|
||||
<td>
|
||||
<select name="newsettings[acl_default]">
|
||||
<option value="deny"{selected_acl_default_deny}>Deny Access</option>
|
||||
<option value="grant"{selected_acl_default_grant}>Grant Access</option>
|
||||
<option value="deny"{selected_acl_default_deny}>{lang_Deny_Access}</option>
|
||||
<option value="grant"{selected_acl_default_grant}>{lang_Grant_Access}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@ -108,7 +120,7 @@
|
||||
<td><input name="newsettings[ldap_host]" value="{value_ldap_host}"></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="{row_off}">
|
||||
<tr bgcolor="{row_on}">
|
||||
<td>{lang_LDAP_accounts_context}:</td>
|
||||
<td><input name="newsettings[ldap_context]" value="{value_ldap_context}" size="40"></td>
|
||||
</tr>
|
||||
@ -118,7 +130,7 @@
|
||||
<td><input name="newsettings[ldap_group_context]" value="{value_ldap_group_context}" size="40"></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="{row_off}">
|
||||
<tr bgcolor="{row_on}">
|
||||
<td>{lang_LDAP_rootdn}:</td>
|
||||
<td><input name="newsettings[ldap_root_dn]" value="{value_ldap_root_dn}" size="40"></td>
|
||||
</tr>
|
||||
@ -128,7 +140,7 @@
|
||||
<td><input name="newsettings[ldap_root_pw]" type="password" value="{value_ldap_root_pw}"></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="{row_off}">
|
||||
<tr bgcolor="{row_on}">
|
||||
<td>{lang_LDAP_encryption_type}:</td>
|
||||
<td>
|
||||
<select name="newsettings[ldap_encryption_type]">
|
||||
|
@ -700,10 +700,30 @@
|
||||
{
|
||||
return False;
|
||||
|
||||
if (! $expiredate)
|
||||
if ($expiredate)
|
||||
{
|
||||
/* expire in 30 days by default */
|
||||
$expiredate = time() + ( ( 60 * 60 ) * (30 * 24) );
|
||||
$expires = mktime(2,0,0,date('n',$expiredate), intval(date('d',$expiredate)), date('Y',$expiredate));
|
||||
}
|
||||
else
|
||||
{
|
||||
if($GLOBALS['phpgw_info']['server']['auto_create_expire'])
|
||||
{
|
||||
if($GLOBALS['phpgw_info']['server']['auto_create_expire'] == 'never')
|
||||
{
|
||||
$expires = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$expiredate = time() + $GLOBALS['phpgw_info']['server']['auto_create_expire'];
|
||||
$exprires = mktime(2,0,0,date('n',$expiredate), intval(date('d',$expiredate)), date('Y',$expiredate));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* expire in 30 days by default */
|
||||
$expiredate = time() + ( ( 60 * 60 ) * (30 * 24) );
|
||||
$exprires = mktime(2,0,0,date('n',$expiredate), intval(date('d',$expiredate)), date('Y',$expiredate));
|
||||
}
|
||||
}
|
||||
|
||||
$acct_info = array(
|
||||
@ -713,7 +733,7 @@
|
||||
'account_firstname' => 'New',
|
||||
'account_lastname' => 'User',
|
||||
'account_status' => $account_status,
|
||||
'account_expires' => mktime(2,0,0,date('n',$expiredate), intval(date('d',$expiredate)), date('Y',$expiredate))
|
||||
'account_expires' => $expires
|
||||
);
|
||||
$this->create($acct_info);
|
||||
$accountid = $this->name2id($accountname);
|
||||
|
@ -299,10 +299,30 @@
|
||||
|
||||
function auto_add($accountname, $passwd, $default_prefs = False, $default_acls = False, $expiredate = 0, $account_status = 'A')
|
||||
{
|
||||
if (!$expiredate)
|
||||
if ($expiredate)
|
||||
{
|
||||
/* expire in 30 days by default */
|
||||
$expiredate = time() + ( ( 60 * 60 ) * (30 * 24) );
|
||||
$expires = mktime(2,0,0,date('n',$expiredate), intval(date('d',$expiredate)), date('Y',$expiredate));
|
||||
}
|
||||
else
|
||||
{
|
||||
if($GLOBALS['phpgw_info']['server']['auto_create_expire'])
|
||||
{
|
||||
if($GLOBALS['phpgw_info']['server']['auto_create_expire'] == 'never')
|
||||
{
|
||||
$expires = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$expiredate = time() + $GLOBALS['phpgw_info']['server']['auto_create_expire'];
|
||||
$exprires = mktime(2,0,0,date('n',$expiredate), intval(date('d',$expiredate)), date('Y',$expiredate));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* expire in 30 days by default */
|
||||
$expiredate = time() + ( ( 60 * 60 ) * (30 * 24) );
|
||||
$exprires = mktime(2,0,0,date('n',$expiredate), intval(date('d',$expiredate)), date('Y',$expiredate));
|
||||
}
|
||||
}
|
||||
|
||||
$acct_info = array(
|
||||
@ -312,7 +332,7 @@
|
||||
'account_firstname' => '',
|
||||
'account_lastname' => '',
|
||||
'account_status' => $account_status,
|
||||
'account_expires' => mktime(2,0,0,date('n',$expiredate), intval(date('d',$expiredate)), date('Y',$expiredate))
|
||||
'account_expires' => $expires
|
||||
);
|
||||
|
||||
$this->db->transaction_begin();
|
||||
|
@ -7,18 +7,18 @@
|
||||
<!-- END header -->
|
||||
<!-- BEGIN body -->
|
||||
<tr bgcolor="{th_bg}">
|
||||
<td colspan="2"><font color="{th_text}"> <b>{lang_Path_information}</b></font></td>
|
||||
<td colspan="2"><font color="{th_text}"> <b>{lang_Path_information}</b></font></td>
|
||||
</tr>
|
||||
|
||||
</tr>
|
||||
<tr bgcolor="{row_off}">
|
||||
<td>{lang_Enter_the_full_path_for_temporary_files.<br>Examples:_/tmp,_C:\TEMP}:</td>
|
||||
<td><input name="newsettings[temp_dir]" value="{value_temp_dir}" size="40"></td>
|
||||
<td><input name="newsettings[temp_dir]" value="{value_temp_dir}" size="40"></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="{row_off}">
|
||||
<td>{lang_Enter_the_full_path_for_users_and_group_files.<br>Examples:_/files,_E:\FILES}:</td>
|
||||
<td><input name="newsettings[files_dir]" value="{value_files_dir}" size="40"></td>
|
||||
<td>{lang_Enter_the_full_path_for_users_and_group_files.<br>Examples:_/files,_E:\FILES}:</td>
|
||||
<td><input name="newsettings[files_dir]" value="{value_files_dir}" size="40"></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="{row_off}">
|
||||
@ -36,7 +36,7 @@
|
||||
|
||||
<tr bgcolor="{row_off}">
|
||||
<td>{lang_Enter_the_hostname_of_the_machine_on_which_this_server_is_running}:</td>
|
||||
<td><input name="newsettings[hostname]" value="{value_hostname}"></td>
|
||||
<td><input name="newsettings[hostname]" value="{value_hostname}"></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="{row_off}">
|
||||
@ -48,8 +48,8 @@
|
||||
<td>{lang_Attempt_to_use_correct_mimetype_for_FTP_instead_of_default_'application/octet-stream'}:</td>
|
||||
<td>
|
||||
<select name="newsettings[ftp_use_mime]">
|
||||
<option value="">No</option>
|
||||
<option value="True"{selected_ftp_use_mime_True}>Yes</option>
|
||||
<option value="">{lang_No}</option>
|
||||
<option value="True"{selected_ftp_use_mime_True}>{lang_Yes}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@ -63,6 +63,17 @@
|
||||
<td>{lang_Enter_your_HTTP_proxy_server_port}:</td>
|
||||
<td><input name="newsettings[httpproxy_port]" value="{value_httpproxy_port}"></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="{row_on}">
|
||||
<td>{lang_Enter_the_site_username_for_peer_servers}.</td>
|
||||
<td><input name="newsettings[site_username]" value="{value_site_username}"></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="{row_off}">
|
||||
<td>{lang_Enter_the_site_password_for_peer_servers}.</td>
|
||||
<td><input type="password" name="newsettings[site_password]" value="{value_site_password}"></td>
|
||||
</tr>
|
||||
|
||||
<!-- END body -->
|
||||
|
||||
<!-- BEGIN footer -->
|
||||
|
@ -19,22 +19,12 @@
|
||||
<td><input name="newsettings[site_title]" value="{value_site_title}"></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="{row_off}">
|
||||
<td>{lang_Enter_the_site_username_for_peer_servers}.</td>
|
||||
<td><input name="newsettings[site_username]" value="{value_site_username}"></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="{row_on}">
|
||||
<td>{lang_Enter_the_site_password_for_peer_servers}.</td>
|
||||
<td><input type="password" name="newsettings[site_password]" value="{value_site_password}"></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="{row_off}">
|
||||
<td>{lang_Show_'powered_by'_logo_on}:</td>
|
||||
<td>
|
||||
<select name="newsettings[showpoweredbyon]">
|
||||
<option value="bottom" {selected_showpoweredbyon_bottom}>bottom</option>
|
||||
<option value="top" {selected_showpoweredbyon_top}>top</option>
|
||||
<option value="bottom" {selected_showpoweredbyon_bottom}>{lang_bottom}</option>
|
||||
<option value="top" {selected_showpoweredbyon_top}>{lang_top}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@ -52,8 +42,8 @@
|
||||
<td>{lang_Use_pure_HTML_compliant_code_(not_fully_working_yet)}:</td>
|
||||
<td>
|
||||
<select name="newsettings[htmlcompliant]">
|
||||
<option value="">No</option>
|
||||
<option value="True"{selected_htmlcompliant_True}>Yes</option>
|
||||
<option value="">{lang_No}</option>
|
||||
<option value="True"{selected_htmlcompliant_True}>{lang_Yes}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@ -62,8 +52,8 @@
|
||||
<td>{lang_Use_cookies_to_pass_sessionid}:</td>
|
||||
<td>
|
||||
<select name="newsettings[usecookies]">
|
||||
<option value="">No</option>
|
||||
<option value="True"{selected_usecookies_True}>Yes</option>
|
||||
<option value="">{lang_No}</option>
|
||||
<option value="True"{selected_usecookies_True}>{lang_Yes}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@ -72,8 +62,8 @@
|
||||
<td>{lang_check_ip_address_of_all_sessions}:</td>
|
||||
<td>
|
||||
<select name="newsettings[sessions_checkip]">
|
||||
<option value="">No</option>
|
||||
<option value="True"{selected_sessions_checkip_True}>Yes</option>
|
||||
<option value="">{lang_No}</option>
|
||||
<option value="True"{selected_sessions_checkip_True}>{lang_Yes}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@ -82,38 +72,50 @@
|
||||
<td>{lang_Would_you_like_phpGroupWare_to_check_for_a_new_version<br>when_admins_login_?}:</td>
|
||||
<td>
|
||||
<select name="newsettings[checkfornewversion]">
|
||||
<option value="">No</option>
|
||||
<option value="True"{selected_checkfornewversion_True}>Yes</option>
|
||||
<option value="">{lang_No}</option>
|
||||
<option value="True"{selected_checkfornewversion_True}>{lang_Yes}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!--
|
||||
<tr bgcolor="{row_off}">
|
||||
<td>{lang_How_would_you_like_to_sort_applications_in_the_navbar?}:</td>
|
||||
<td>
|
||||
<select name="newsettings[app_order]">
|
||||
<option value="">{lang_Order_id}</option>
|
||||
<option value="True"{selected_app_order_True}>{lang_Alphabetically}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
-->
|
||||
|
||||
<tr bgcolor="{row_on}">
|
||||
<td>{lang_Would_you_like_to_show_each_application's_upgrade_status_?}:</td><td>
|
||||
<select name="newsettings[checkappversions]">
|
||||
<option value="">No</option>
|
||||
<option value="">{lang_No}</option>
|
||||
<option value="Admin"{selected_checkappversions_Admin}>{lang_Admins}</option>
|
||||
<option value="All"{selected_checkappversions_All}>{lang_All_Users}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="{row_on}">
|
||||
<tr bgcolor="{row_off}">
|
||||
<td>{lang_Would_you_like_phpGroupWare_to_cache_the_phpgw_info_array_?}:</td>
|
||||
<td>
|
||||
<select name="newsettings[cache_phpgw_info]">
|
||||
<option value="">No</option>
|
||||
<option value="True"{selected_cache_phpgw_info_True}>Yes</option>
|
||||
<option value="">{lang_No}</option>
|
||||
<option value="True"{selected_cache_phpgw_info_True}>{lang_Yes}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="{row_off}">
|
||||
<tr bgcolor="{row_on}">
|
||||
<td>{lang_Deny_all_users_access_to_grant_other_users_access_to_their_entries_?}:</td>
|
||||
<td>
|
||||
<select name="newsettings[deny_user_grants_access]">
|
||||
<option value="">No</option>
|
||||
<option value="True"{selected_deny_user_grants_access_True}>Yes</option>
|
||||
<option value="">{lang_No}</option>
|
||||
<option value="True"{selected_deny_user_grants_access_True}>{lang_Yes}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
Loading…
Reference in New Issue
Block a user