fixed prob with not changeable pw's, setup::add_acl created acl_rights=0 rows, instead of no rows

This commit is contained in:
Ralf Becker 2004-02-23 13:22:59 +00:00
parent 2898b043c9
commit b4970a5f65
3 changed files with 20 additions and 4 deletions

View File

@ -1003,9 +1003,16 @@
$apps = array($apps);
}
foreach($apps as $app)
{
if ($rights)
{
$this->db->query("INSERT INTO phpgw_acl(acl_appname,acl_location,acl_account,acl_rights) VALUES('$app','$location',$account,$rights)");
}
else
{
$this->db->query("DELETE FROM phpgw_acl WHERE acl_appname='$app' AND acl_location='$location' AND acl_account=$account");
}
}
}
}
?>

View File

@ -10,12 +10,11 @@
\**************************************************************************/
// $Id$
// $Source$
/* Basic information about this app */
$setup_info['phpgwapi']['name'] = 'phpgwapi';
$setup_info['phpgwapi']['title'] = 'phpgwapi';
$setup_info['phpgwapi']['version'] = '0.9.99.013';
$setup_info['phpgwapi']['version'] = '0.9.99.014';
$setup_info['phpgwapi']['versions']['current_header'] = '1.26';
$setup_info['phpgwapi']['enable'] = 3;
$setup_info['phpgwapi']['app_order'] = 1;

View File

@ -1017,4 +1017,14 @@
$GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.99.013';
return $GLOBALS['setup_info']['phpgwapi']['currentver'];
}
?>
$test[] = '0.9.99.013';
function phpgwapi_upgrade0_9_99_013()
{
// this update fixes the problem that some users cant change their password
// it was caused be 0 acl_rights values in groups (inserted by setup::add_acl which is fixed too)
$GLOBALS['phpgw_setup']->oProc->query("DELETE FROM phpgw_acl WHERE acl_appname='preferences' AND acl_location='changepassword' AND acl_rights=0");
$GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.99.014';
return $GLOBALS['setup_info']['phpgwapi']['currentver'];
}