reversed password change ACL from changepassword to nopassword change, to allow eGW users created in LDAP to be full users, without the need to change/add something in the ACL table

This commit is contained in:
Ralf Becker 2006-06-23 01:28:47 +00:00
parent e457717dde
commit e6e05e283c
3 changed files with 9 additions and 8 deletions

View File

@ -730,13 +730,13 @@
{
$acl->delete_repository('phpgwapi','anonymous',$_userData['account_id']);
}
if ($_userData['changepassword'])
if (!$_userData['changepassword'])
{
$GLOBALS['egw']->acl->add_repository('preferences','changepassword',$_userData['account_id'],1);
$GLOBALS['egw']->acl->add_repository('preferences','nopasswordchange',$_userData['account_id'],1);
}
else
{
$GLOBALS['egw']->acl->delete_repository('preferences','changepassword',$_userData['account_id']);
$GLOBALS['egw']->acl->delete_repository('preferences','nopasswordchange',$_userData['account_id']);
}
$GLOBALS['egw']->session->delete_cache((int)$_userData['account_id']);
}

View File

@ -78,9 +78,9 @@
}
$apps->save_repository();
if ($userData['changepassword'])
if (!$userData['changepassword'])
{
$GLOBALS['egw']->acl->add_repository('preferences','changepassword',$userData['account_id'],1);
$GLOBALS['egw']->acl->add_repository('preferences','nopasswordchange',$userData['account_id'],1);
}
$apps->account_apps = array(array());

View File

@ -670,7 +670,7 @@
// NDEE210804
// added for different way of handling ldap entries inside account manager
// we show this only, if accounts are stored in ldap
/* just doublicated EMailAdmin functionality
if ($GLOBALS['egw_info']['server']['account_repository'] == "ldap")
{
$GLOBALS['menuData'][] = array(
@ -679,6 +679,7 @@
'extradata' => 'menuaction=admin.uildap_mgr.editUserData'
);
}
*/
//NDEE
@ -767,7 +768,7 @@
$acl =& CreateObject('phpgwapi.acl',(int)$_GET['account_id']);
$var['anonymous'] = $acl->check('anonymous',1,'phpgwapi') ? '  X' : ' ';
$var['changepassword'] = $acl->check('changepassword',0xFFFF,'preferences') ? '  X' : ' ';
$var['changepassword'] = !$acl->check('nopasswordchange',1,'preferences') ? '  X' : ' ';
unset($acl);
if ($userData['status'])
@ -1087,7 +1088,7 @@
$acl =& CreateObject('phpgwapi.acl',$_account_id);
$acl->read_repository();
$userData['anonymous'] = $acl->check('anonymous',1,'phpgwapi');
$userData['changepassword'] = $acl->check('changepassword',0xFFFF,'preferences');
$userData['changepassword'] = !$acl->check('nopasswordchange',1,'preferences');
unset($acl);
}
else