mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:20 +01:00
split up the auth class. Added authentication based on email account
This commit is contained in:
parent
c13ee23344
commit
0583ccdcdb
@ -14,7 +14,7 @@
|
|||||||
$phpgw_info["flags"] = array("currentapp" => "admin", "enable_nextmatchs_class" => True);
|
$phpgw_info["flags"] = array("currentapp" => "admin", "enable_nextmatchs_class" => True);
|
||||||
include("../header.inc.php");
|
include("../header.inc.php");
|
||||||
include($phpgw_info["server"]["server_root"] . "/admin/inc/accounts_"
|
include($phpgw_info["server"]["server_root"] . "/admin/inc/accounts_"
|
||||||
. $phpgw_info["server"]["auth_type"] . ".inc.php");
|
. $phpgw_info["server"]["account_repository"] . ".inc.php");
|
||||||
|
|
||||||
$phpgw->template->set_file(array("header" => "accounts.tpl",
|
$phpgw->template->set_file(array("header" => "accounts.tpl",
|
||||||
"row" => "accounts.tpl",
|
"row" => "accounts.tpl",
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
$phpgw_info["flags"]["currentapp"] = "admin";
|
$phpgw_info["flags"]["currentapp"] = "admin";
|
||||||
include("../header.inc.php");
|
include("../header.inc.php");
|
||||||
include($phpgw_info["server"]["server_root"] . "/admin/inc/accounts_"
|
include($phpgw_info["server"]["server_root"] . "/admin/inc/accounts_"
|
||||||
. $phpgw_info["server"]["auth_type"] . ".inc.php");
|
. $phpgw_info["server"]["account_repository"] . ".inc.php");
|
||||||
|
|
||||||
// I didn't active this code until all tables are up to date using the owner field
|
// I didn't active this code until all tables are up to date using the owner field
|
||||||
// The calendar isn't update to date. (jengo)
|
// The calendar isn't update to date. (jengo)
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True, "currentapp" => "admin");
|
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True, "currentapp" => "admin");
|
||||||
include("../header.inc.php");
|
include("../header.inc.php");
|
||||||
include($phpgw_info["server"]["server_root"] . "/admin/inc/accounts_"
|
include($phpgw_info["server"]["server_root"] . "/admin/inc/accounts_"
|
||||||
. $phpgw_info["server"]["auth_type"] . ".inc.php");
|
. $phpgw_info["server"]["account_repository"] . ".inc.php");
|
||||||
|
|
||||||
if (! $account_id) {
|
if (! $account_id) {
|
||||||
Header("Location: " . $phpgw->link("accounts.php"));
|
Header("Location: " . $phpgw->link("accounts.php"));
|
||||||
@ -23,7 +23,7 @@
|
|||||||
if ($submit) {
|
if ($submit) {
|
||||||
$totalerrors = 0;
|
$totalerrors = 0;
|
||||||
|
|
||||||
if ($phpgw_info["server"]["auth_type"] == "ldap") {
|
if ($phpgw_info["server"]["account_repository"] == "ldap") {
|
||||||
if (strlen($n_loginid) > 8) {
|
if (strlen($n_loginid) > 8) {
|
||||||
$error[$totalerrors++] = lang("The loginid can not be more then 8 characters");
|
$error[$totalerrors++] = lang("The loginid can not be more then 8 characters");
|
||||||
}
|
}
|
||||||
@ -72,7 +72,7 @@
|
|||||||
?>
|
?>
|
||||||
<form method="POST" action="<?php echo $phpgw->link("editaccount.php"); ?>">
|
<form method="POST" action="<?php echo $phpgw->link("editaccount.php"); ?>">
|
||||||
<input type="hidden" name="account_id" value="<?
|
<input type="hidden" name="account_id" value="<?
|
||||||
if ($phpgw_info["server"]["auth_type"] == "ldap")
|
if ($phpgw_info["server"]["account_repository"] == "ldap")
|
||||||
{
|
{
|
||||||
echo rawurlencode($userData["account_dn"]);
|
echo rawurlencode($userData["account_dn"]);
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
$phpgw_info["flags"] = array("currentapp" => "admin", "noheader" => True, "nonavbar" => True);
|
$phpgw_info["flags"] = array("currentapp" => "admin", "noheader" => True, "nonavbar" => True);
|
||||||
include("../header.inc.php");
|
include("../header.inc.php");
|
||||||
include($phpgw_info["server"]["server_root"] . "/admin/inc/accounts_"
|
include($phpgw_info["server"]["server_root"] . "/admin/inc/accounts_"
|
||||||
. $phpgw_info["server"]["auth_type"] . ".inc.php");
|
. $phpgw_info["server"]["account_repository"] . ".inc.php");
|
||||||
|
|
||||||
function add_default_preferences($account_id)
|
function add_default_preferences($account_id)
|
||||||
{
|
{
|
||||||
@ -42,7 +42,7 @@
|
|||||||
if ($submit) {
|
if ($submit) {
|
||||||
$totalerrors = 0;
|
$totalerrors = 0;
|
||||||
|
|
||||||
if ($phpgw_info["server"]["auth_type"] == "ldap") {
|
if ($phpgw_info["server"]["account_repository"] == "ldap") {
|
||||||
if (strlen($n_loginid) > 8) {
|
if (strlen($n_loginid) > 8) {
|
||||||
$error[$totalerrors++] = lang("The loginid can not be more then 8 characters");
|
$error[$totalerrors++] = lang("The loginid can not be more then 8 characters");
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
include("../header.inc.php");
|
include("../header.inc.php");
|
||||||
include($phpgw_info["server"]["server_root"] . "/admin/inc/accounts_"
|
include($phpgw_info["server"]["server_root"] . "/admin/inc/accounts_"
|
||||||
. $phpgw_info["server"]["auth_type"] . ".inc.php");
|
. $phpgw_info["server"]["account_repository"] . ".inc.php");
|
||||||
|
|
||||||
if (! $account_id) {
|
if (! $account_id) {
|
||||||
Header("Location: " . $phpgw->link("accounts.php"));
|
Header("Location: " . $phpgw->link("accounts.php"));
|
||||||
|
@ -162,7 +162,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr bgcolor="486591">
|
<tr bgcolor="486591">
|
||||||
<td colspan="2"><font color="fefefe"> <b>Authentication</b></font></td>
|
<td colspan="2"><font color="fefefe"> <b>Authentication / Accounts</b></font></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php $selected[$current_config["auth_type"]] = " selected"; ?>
|
<?php $selected[$current_config["auth_type"]] = " selected"; ?>
|
||||||
@ -172,11 +172,30 @@
|
|||||||
<select name="newsettings[auth_type]">
|
<select name="newsettings[auth_type]">
|
||||||
<option value="sql"<?php echo $selected["sql"]; ?>>SQL</option>
|
<option value="sql"<?php echo $selected["sql"]; ?>>SQL</option>
|
||||||
<option value="ldap"<?php echo $selected["ldap"]; ?>>LDAP</option>
|
<option value="ldap"<?php echo $selected["ldap"]; ?>>LDAP</option>
|
||||||
|
<option value="mail"<?php echo $selected["mail"]; ?>>Mail</option>
|
||||||
|
<option value="pam"<?php echo $selected["pam"]; ?>>PAM (Not Ready)</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php $selected = array(); ?>
|
<?php $selected = array(); ?>
|
||||||
|
|
||||||
|
<?php $selected[$current_config["account_repository"]] = " selected"; ?>
|
||||||
|
<tr bgcolor="e6e6e6">
|
||||||
|
<td>Select where you want to store/retrieve user accounts.</td>
|
||||||
|
<td>
|
||||||
|
<select name="newsettings[account_repository]">
|
||||||
|
<option value="sql"<?php echo $selected["sql"]; ?>>SQL</option>
|
||||||
|
<option value="ldap"<?php echo $selected["ldap"]; ?>>LDAP</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php $selected = array(); ?>
|
||||||
|
|
||||||
|
<tr bgcolor="e6e6e6">
|
||||||
|
<td>Auto create account records for authenticated users:</td>
|
||||||
|
<td><input type="checkbox" name="newsettings[auto_create_acct]" value="True"<?php echo ($current_config["auto_create_acct"]?" checked":""); ?>></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr bgcolor="e6e6e6">
|
<tr bgcolor="e6e6e6">
|
||||||
<td>LDAP host:</td>
|
<td>LDAP host:</td>
|
||||||
<td><input name="newsettings[ldap_host]" value="<?php echo $current_config["ldap_host"]; ?>"></td>
|
<td><input name="newsettings[ldap_host]" value="<?php echo $current_config["ldap_host"]; ?>"></td>
|
||||||
|
Loading…
Reference in New Issue
Block a user