[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: admin/inc class.boaccounts.inc.php,1.22.2.7.2.1
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: admin/inc class.boaccounts.inc.php,1.22.2.7.2.1,1.22.2.7.2.2 class.soaccounts.inc.php,1.8.2.1.2.1,1.8.2.1.2.2 class.uiaccounts.inc.php,1.23.2.9.2.10,1.23.2.9.2.11 |
Date: |
Sun, 18 May 2003 16:55:43 -0400 |
Update of /cvsroot/phpgroupware/admin/inc
In directory subversions:/tmp/cvs-serv27341/inc
Modified Files:
Tag: Version-0_9_16-branch
class.boaccounts.inc.php class.soaccounts.inc.php
class.uiaccounts.inc.php
Log Message:
added checkbox to user-accounts to allow/disallow a user to change his password
Index: class.boaccounts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.boaccounts.inc.php,v
retrieving revision 1.22.2.7.2.1
retrieving revision 1.22.2.7.2.2
diff -C2 -r1.22.2.7.2.1 -r1.22.2.7.2.2
*** class.boaccounts.inc.php 17 May 2003 21:27:56 -0000 1.22.2.7.2.1
--- class.boaccounts.inc.php 18 May 2003 20:55:39 -0000 1.22.2.7.2.2
***************
*** 78,82 ****
function delete_group()
{
! if
(address@hidden($GLOBALS['HTTP_POST_VARS']['account_id']) ||
address@hidden'HTTP_POST_VARS']['account_id'] ||
$GLOBALS['phpgw']->acl->check('group_access',32,'admin'))
{
ExecMethod('admin.uiaccounts.list_groups');
--- 78,82 ----
function delete_group()
{
! if (address@hidden($_POST['account_id']) ||
address@hidden'account_id'] ||
$GLOBALS['phpgw']->acl->check('group_access',32,'admin'))
{
ExecMethod('admin.uiaccounts.list_groups');
***************
*** 84,88 ****
}
! $account_id =
intval($GLOBALS['HTTP_POST_VARS']['account_id']);
$GLOBALS['phpgw']->db->lock(
--- 84,88 ----
}
! $account_id = intval($_POST['account_id']);
$GLOBALS['phpgw']->db->lock(
***************
*** 123,134 ****
function delete_user()
{
! if (isset($GLOBALS['HTTP_POST_VARS']['cancel']) ||
$GLOBALS['phpgw']->acl->check('account_access',32,'admin'))
{
ExecMethod('admin.uiaccounts.list_users');
return False;
}
! elseif($GLOBALS['HTTP_POST_VARS']['delete_account'])
{
! $accountid =
$GLOBALS['HTTP_POST_VARS']['account_id'];
settype($account_id,'integer');
$account_id = get_account_id($accountid);
--- 123,134 ----
function delete_user()
{
! if (isset($_POST['cancel']) ||
$GLOBALS['phpgw']->acl->check('account_access',32,'admin'))
{
ExecMethod('admin.uiaccounts.list_users');
return False;
}
! elseif($_POST['delete_account'])
{
! $accountid = $_POST['account_id'];
settype($account_id,'integer');
$account_id = get_account_id($accountid);
***************
*** 182,186 ****
}
! $temp_users =
($GLOBALS['HTTP_POST_VARS']['account_user']?$GLOBALS['HTTP_POST_VARS']['account_user']:Array());
$account_user = Array();
@reset($temp_users);
--- 182,186 ----
}
! $temp_users =
($_POST['account_user']?$_POST['account_user']:Array());
$account_user = Array();
@reset($temp_users);
***************
*** 191,195 ****
@reset($account_user);
! $group_permissions =
($GLOBALS['HTTP_POST_VARS']['account_apps']?$GLOBALS['HTTP_POST_VARS']['account_apps']:Array());
$account_apps = Array();
@reset($group_permissions);
--- 191,195 ----
@reset($account_user);
! $group_permissions =
($_POST['account_apps']?$_POST['account_apps']:Array());
$account_apps = Array();
@reset($group_permissions);
***************
*** 204,209 ****
$group_info = Array(
! 'account_id' =>
($GLOBALS['HTTP_POST_VARS']['account_id']?intval($GLOBALS['HTTP_POST_VARS']['account_id']):0),
! 'account_name' =>
($GLOBALS['HTTP_POST_VARS']['account_name']?$GLOBALS['HTTP_POST_VARS']['account_name']:''),
'account_user' => $account_user,
'account_apps' => $account_apps
--- 204,209 ----
$group_info = Array(
! 'account_id' =>
($_POST['account_id']?intval($_POST['account_id']):0),
! 'account_name' =>
($_POST['account_name']?$_POST['account_name']:''),
'account_user' => $account_user,
'account_apps' => $account_apps
***************
*** 304,330 ****
}
! if ($GLOBALS['HTTP_POST_VARS']['submit'])
{
$userData = array(
'account_type' => 'u',
! 'account_lid' =>
$GLOBALS['HTTP_POST_VARS']['account_lid'],
! 'account_firstname' =>
$GLOBALS['HTTP_POST_VARS']['account_firstname'],
! 'account_lastname' =>
$GLOBALS['HTTP_POST_VARS']['account_lastname'],
! 'account_passwd' =>
$GLOBALS['HTTP_POST_VARS']['account_passwd'],
! 'status' =>
($GLOBALS['HTTP_POST_VARS']['account_status'] ? 'A' : ''),
! 'account_status' =>
($GLOBALS['HTTP_POST_VARS']['account_status'] ? 'A' : ''),
! 'old_loginid' =>
($GLOBALS['HTTP_GET_VARS']['old_loginid']?rawurldecode($GLOBALS['HTTP_GET_VARS']['old_loginid']):''),
! 'account_id' =>
($GLOBALS['HTTP_GET_VARS']['account_id']?$GLOBALS['HTTP_GET_VARS']['account_id']:0),
! 'account_passwd_2' =>
$GLOBALS['HTTP_POST_VARS']['account_passwd_2'],
! 'account_groups' =>
$GLOBALS['HTTP_POST_VARS']['account_groups'],
! 'anonymous' =>
$GLOBALS['HTTP_POST_VARS']['anonymous'],
! 'account_permissions' =>
$GLOBALS['HTTP_POST_VARS']['account_permissions'],
! 'homedirectory' =>
$GLOBALS['HTTP_POST_VARS']['homedirectory'],
! 'loginshell' =>
$GLOBALS['HTTP_POST_VARS']['loginshell'],
! 'account_expires_month' =>
$GLOBALS['HTTP_POST_VARS']['account_expires_month'],
! 'account_expires_day' =>
$GLOBALS['HTTP_POST_VARS']['account_expires_day'],
! 'account_expires_year' =>
$GLOBALS['HTTP_POST_VARS']['account_expires_year'],
! 'account_expires_never' =>
$GLOBALS['HTTP_POST_VARS']['never_expires']
! /* 'file_space' =>
$GLOBALS['HTTP_POST_VARS']['account_file_space_number'] . "-" .
$GLOBALS['HTTP_POST_VARS']['account_file_space_type'] */
);
--- 304,331 ----
}
! if ($_POST['submit'])
{
$userData = array(
'account_type' => 'u',
! 'account_lid' =>
$_POST['account_lid'],
! 'account_firstname' =>
$_POST['account_firstname'],
! 'account_lastname' =>
$_POST['account_lastname'],
! 'account_passwd' =>
$_POST['account_passwd'],
! 'status' =>
($_POST['account_status'] ? 'A' : ''),
! 'account_status' =>
($_POST['account_status'] ? 'A' : ''),
! 'old_loginid' =>
($_GET['old_loginid']?rawurldecode($_GET['old_loginid']):''),
! 'account_id' =>
($_GET['account_id']?$_GET['account_id']:0),
! 'account_passwd_2' =>
$_POST['account_passwd_2'],
! 'account_groups' =>
$_POST['account_groups'],
! 'anonymous' =>
$_POST['anonymous'],
! 'changepassword' =>
$_POST['changepassword'],
! 'account_permissions' =>
$_POST['account_permissions'],
! 'homedirectory' =>
$_POST['homedirectory'],
! 'loginshell' =>
$_POST['loginshell'],
! 'account_expires_month' =>
$_POST['account_expires_month'],
! 'account_expires_day' =>
$_POST['account_expires_day'],
! 'account_expires_year' =>
$_POST['account_expires_year'],
! 'account_expires_never' =>
$_POST['never_expires']
! /* 'file_space' =>
$_POST['account_file_space_number'] . "-" . $_POST['account_file_space_type'] */
);
***************
*** 372,376 ****
}
! $temp_users =
($GLOBALS['HTTP_POST_VARS']['account_user']?$GLOBALS['HTTP_POST_VARS']['account_user']:Array());
$account_user = Array();
@reset($temp_users);
--- 373,377 ----
}
! $temp_users =
($_POST['account_user']?$_POST['account_user']:Array());
$account_user = Array();
@reset($temp_users);
***************
*** 381,385 ****
@reset($account_user);
! $group_permissions =
($GLOBALS['HTTP_POST_VARS']['account_apps']?$GLOBALS['HTTP_POST_VARS']['account_apps']:Array());
$account_apps = Array();
@reset($group_permissions);
--- 382,386 ----
@reset($account_user);
! $group_permissions =
($_POST['account_apps']?$_POST['account_apps']:Array());
$account_apps = Array();
@reset($group_permissions);
***************
*** 394,399 ****
$group_info = Array(
! 'account_id' =>
($GLOBALS['HTTP_POST_VARS']['account_id']?intval($GLOBALS['HTTP_POST_VARS']['account_id']):0),
! 'account_name' =>
($GLOBALS['HTTP_POST_VARS']['account_name']?$GLOBALS['HTTP_POST_VARS']['account_name']:''),
'account_user' => $account_user,
'account_apps' => $account_apps
--- 395,400 ----
$group_info = Array(
! 'account_id' =>
($_POST['account_id']?intval($_POST['account_id']):0),
! 'account_name' =>
($_POST['account_name']?$_POST['account_name']:''),
'account_user' => $account_user,
'account_apps' => $account_apps
***************
*** 525,529 ****
// Update any other options here, since the above
save_repository () depends
// on a group having users
! $group->data['file_space'] =
$GLOBALS['HTTP_POST_VARS']['account_file_space_number'] . "-" .
$GLOBALS['HTTP_POST_VARS']['account_file_space_type'];
$group->save_repository();
*/
--- 526,530 ----
// Update any other options here, since the above
save_repository () depends
// on a group having users
! $group->data['file_space'] =
$_POST['account_file_space_number'] . "-" . $_POST['account_file_space_type'];
$group->save_repository();
*/
***************
*** 543,570 ****
}
! if ($GLOBALS['HTTP_POST_VARS']['submit'])
{
$userData = array(
! 'account_lid' =>
$GLOBALS['HTTP_POST_VARS']['account_lid'],
! 'firstname' =>
$GLOBALS['HTTP_POST_VARS']['account_firstname'],
! 'lastname' =>
$GLOBALS['HTTP_POST_VARS']['account_lastname'],
! 'account_passwd' =>
$GLOBALS['HTTP_POST_VARS']['account_passwd'],
! 'status' =>
($GLOBALS['HTTP_POST_VARS']['account_status'] ? 'A' : ''),
! 'account_status' =>
($GLOBALS['HTTP_POST_VARS']['account_status'] ? 'A' : ''),
! 'old_loginid' =>
($GLOBALS['HTTP_GET_VARS']['old_loginid']?rawurldecode($GLOBALS['HTTP_GET_VARS']['old_loginid']):''),
! 'account_id' =>
($GLOBALS['HTTP_GET_VARS']['account_id']?$GLOBALS['HTTP_GET_VARS']['account_id']:0),
! 'account_passwd_2' =>
$GLOBALS['HTTP_POST_VARS']['account_passwd_2'],
! 'account_groups' =>
$GLOBALS['HTTP_POST_VARS']['account_groups'],
! 'anonymous' =>
$GLOBALS['HTTP_POST_VARS']['anonymous'],
! 'account_permissions' =>
$GLOBALS['HTTP_POST_VARS']['account_permissions'],
! 'homedirectory' =>
$GLOBALS['HTTP_POST_VARS']['homedirectory'],
! 'loginshell' =>
$GLOBALS['HTTP_POST_VARS']['loginshell'],
! 'account_expires_month' =>
$GLOBALS['HTTP_POST_VARS']['account_expires_month'],
! 'account_expires_day' =>
$GLOBALS['HTTP_POST_VARS']['account_expires_day'],
! 'account_expires_year' =>
$GLOBALS['HTTP_POST_VARS']['account_expires_year'],
! 'account_expires_never' =>
$GLOBALS['HTTP_POST_VARS']['never_expires']
! /* 'file_space' =>
$GLOBALS['HTTP_POST_VARS']['account_file_space_number'] . "-" .
$GLOBALS['HTTP_POST_VARS']['account_file_space_type'] */
);
-
if (!$errors = $this->validate_user($userData))
{
--- 544,571 ----
}
! if ($_POST['submit'])
{
$userData = array(
! 'account_lid' =>
$_POST['account_lid'],
! 'firstname' =>
$_POST['account_firstname'],
! 'lastname' =>
$_POST['account_lastname'],
! 'account_passwd' =>
$_POST['account_passwd'],
! 'status' =>
($_POST['account_status'] ? 'A' : ''),
! 'account_status' =>
($_POST['account_status'] ? 'A' : ''),
! 'old_loginid' =>
($_GET['old_loginid']?rawurldecode($_GET['old_loginid']):''),
! 'account_id' =>
($_GET['account_id']?$_GET['account_id']:0),
! 'account_passwd_2' =>
$_POST['account_passwd_2'],
! 'account_groups' =>
$_POST['account_groups'],
! 'anonymous' =>
$_POST['anonymous'],
! 'changepassword' =>
$_POST['changepassword'],
! 'account_permissions' =>
$_POST['account_permissions'],
! 'homedirectory' =>
$_POST['homedirectory'],
! 'loginshell' =>
$_POST['loginshell'],
! 'account_expires_month' =>
$_POST['account_expires_month'],
! 'account_expires_day' =>
$_POST['account_expires_day'],
! 'account_expires_year' =>
$_POST['account_expires_year'],
! 'account_expires_never' =>
$_POST['never_expires']
! /* 'file_space' =>
$_POST['account_file_space_number'] . "-" . $_POST['account_file_space_type'] */
);
if (!$errors = $this->validate_user($userData))
{
***************
*** 586,590 ****
else
{
!
ExecMethod('admin.uiaccounts.edit_user',$GLOBALS['HTTP_GET_VARS']['account_id']);
return False;
}
--- 587,591 ----
else
{
!
ExecMethod('admin.uiaccounts.edit_user',$_GET['account_id']);
return False;
}
***************
*** 600,623 ****
function set_group_managers()
{
!
if($GLOBALS['phpgw']->acl->check('group_access',16,'admin') ||
$GLOBALS['HTTP_POST_VARS']['cancel'])
{
$GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.list_groups'));
$GLOBALS['phpgw']->common->phpgw_exit();
}
! elseif($GLOBALS['HTTP_POST_VARS']['submit'])
{
! $acl =
CreateObject('phpgwapi.acl',intval($GLOBALS['HTTP_POST_VARS']['account_id']));
! $users =
$GLOBALS['phpgw']->accounts->member($GLOBALS['HTTP_POST_VARS']['account_id']);
@reset($users);
while($managers && list($key,$user) =
each($users))
{
!
$acl->add_repository('phpgw_group',intval($GLOBALS['HTTP_POST_VARS']['account_id']),$user['account_id'],1);
}
! $managers =
$GLOBALS['HTTP_POST_VARS']['managers'];
@reset($managers);
while($managers && list($key,$manager) =
each($managers))
{
!
$acl->add_repository('phpgw_group',intval($GLOBALS['HTTP_POST_VARS']['account_id']),$manager,(1
+ PHPGW_ACL_GROUP_MANAGERS));
}
}
--- 601,624 ----
function set_group_managers()
{
!
if($GLOBALS['phpgw']->acl->check('group_access',16,'admin') || $_POST['cancel'])
{
$GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.list_groups'));
$GLOBALS['phpgw']->common->phpgw_exit();
}
! elseif($_POST['submit'])
{
! $acl =
CreateObject('phpgwapi.acl',intval($_POST['account_id']));
! $users =
$GLOBALS['phpgw']->accounts->member($_POST['account_id']);
@reset($users);
while($managers && list($key,$user) =
each($users))
{
!
$acl->add_repository('phpgw_group',intval($_POST['account_id']),$user['account_id'],1);
}
! $managers = $_POST['managers'];
@reset($managers);
while($managers && list($key,$manager) =
each($managers))
{
!
$acl->add_repository('phpgw_group',intval($_POST['account_id']),$manager,(1 +
PHPGW_ACL_GROUP_MANAGERS));
}
}
***************
*** 822,825 ****
--- 823,834 ----
{
$acl->delete_repository('phpgwapi','anonymous',$_userData['account_id']);
+ }
+ if ($_userData['changepassword'])
+ {
+
$GLOBALS['phpgw']->acl->add_repository('preferences','changepassword',$_userData['account_id'],1);
+ }
+ else
+ {
+
$GLOBALS['phpgw']->acl->delete_repository('preferences','changepassword',$_userData['account_id']);
}
$GLOBALS['phpgw']->session->delete_cache(intval($_userData['account_id']));
Index: class.soaccounts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.soaccounts.inc.php,v
retrieving revision 1.8.2.1.2.1
retrieving revision 1.8.2.1.2.2
diff -C2 -r1.8.2.1.2.1 -r1.8.2.1.2.2
*** class.soaccounts.inc.php 4 Apr 2003 13:25:53 -0000 1.8.2.1.2.1
--- class.soaccounts.inc.php 18 May 2003 20:55:40 -0000 1.8.2.1.2.2
***************
*** 81,86 ****
$apps->save_repository();
!
$GLOBALS['phpgw']->acl->add_repository('preferences','changepassword',$userData['account_id'],1);
!
// Assign user to groups
if ($userData['account_groups'])
--- 81,88 ----
$apps->save_repository();
! if ($userData['changepassword'])
! {
!
$GLOBALS['phpgw']->acl->add_repository('preferences','changepassword',$userData['account_id'],1);
! }
// Assign user to groups
if ($userData['account_groups'])
Index: class.uiaccounts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.uiaccounts.inc.php,v
retrieving revision 1.23.2.9.2.10
retrieving revision 1.23.2.9.2.11
diff -C2 -r1.23.2.9.2.10 -r1.23.2.9.2.11
*** class.uiaccounts.inc.php 17 May 2003 21:27:56 -0000 1.23.2.9.2.10
--- class.uiaccounts.inc.php 18 May 2003 20:55:40 -0000 1.23.2.9.2.11
***************
*** 580,584 ****
'lang_lastname' => lang('Last Name'),
'lang_groups' => lang('Groups'),
! 'lang_anonymous' => lang('Anonymous
user<br>(not shown in list sessions)'),
'lang_firstname' => lang('First Name'),
'lang_lastlogin' => lang('Last login'),
--- 580,585 ----
'lang_lastname' => lang('Last Name'),
'lang_groups' => lang('Groups'),
! 'lang_anonymous' => lang('Anonymous user
(not shown in list sessions)'),
! 'lang_changepassword'=> lang('Can change
password'),
'lang_firstname' => lang('First Name'),
'lang_lastlogin' => lang('Last login'),
***************
*** 598,601 ****
--- 599,603 ----
$acl =
CreateObject('phpgwapi.acl',intval($_GET['account_id']));
$var['anonymous'] =
$acl->check('anonymous',1,'phpgwapi') ? 'X' : '';
+ $var['changepassword'] =
$acl->check('changepassword',0xFFFF,'preferences') ? 'X' : '';
unset($acl);
***************
*** 951,954 ****
--- 953,961 ----
$userData = $account->read_repository();
$userGroups =
$account->membership($_account_id);
+ $acl =
CreateObject('phpgwapi.acl',$_account_id);
+ $acl->read_repository();
+ $userData['anonymous'] =
$acl->check('anonymous',1,'phpgwapi');
+ $userData['changepassword'] =
$acl->check('changepassword',0xFFFF,'preferences');
+ unset($acl);
}
else
***************
*** 958,961 ****
--- 965,970 ----
$userData['status'] = 'A';
$userGroups = Array();
+ $userData['anonymous'] = False;
+ $userData['changepassword'] = True;
}
$allGroups = $account->get_list('groups');
***************
*** 975,982 ****
$userData['account_expires_year'] =
date('Y',$userData['expires'] > 0 ? $userData['expires'] : $time_var);
}
- $acl =
CreateObject('phpgwapi.acl',$_account_id);
- $acl->read_repository();
- $userData['anonymous'] =
$acl->check('anonymous',1,'phpgwapi');
- unset($acl);
}
$page_params['menuaction'] =
'admin.boaccounts.'.($_account_id?'edit':'add').'_user';
--- 984,987 ----
***************
*** 1002,1006 ****
'lang_expires' => lang('Expires'),
'lang_firstname' => lang('First Name'),
! 'lang_anonymous' => lang('Anonymous
User<br>(not shown in list sessions)'),
'lang_button' =>
($_account_id?lang('Save'):lang('Add'))
/* 'lang_file_space' => lang('File Space') */
--- 1007,1012 ----
'lang_expires' => lang('Expires'),
'lang_firstname' => lang('First Name'),
! 'lang_anonymous' => lang('Anonymous User (not
shown in list sessions)'),
! 'lang_changepassword' => lang('Can change
password'),
'lang_button' =>
($_account_id?lang('Save'):lang('Add'))
/* 'lang_file_space' => lang('File Space') */
***************
*** 1068,1071 ****
--- 1074,1078 ----
'loginshell' => $loginshell,
'anonymous' => '<input type="checkbox"
name="anonymous" value="1"'.($userData['anonymous'] ? ' checked' : '').'>',
+ 'changepassword'=> '<input type="checkbox"
name="changepassword" value="1"'.($userData['changepassword'] ? ' checked' :
'').'>',
'account_status' => '<input type="checkbox"
name="account_status" value="A"'.($userData['status']?' checked':'').'>',
'account_firstname' => '<input
name="account_firstname" value="' . $userData['firstname'] . '">',
***************
*** 1129,1133 ****
/* create apps output */
$appRightsOutput = '';
- $this->nextmatchs->alternate_row_color();
// @reset($perm_display);
for ($i=0;$i<=count($perm_display);$i++)
--- 1136,1139 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: admin/inc class.boaccounts.inc.php,1.22.2.7.2.1,1.22.2.7.2.2 class.soaccounts.inc.php,1.8.2.1.2.1,1.8.2.1.2.2 class.uiaccounts.inc.php,1.23.2.9.2.10,1.23.2.9.2.11,
Ralf Becker <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: admin/templates/default config.tpl,1.14,1.15
- Next by Date:
[Phpgroupware-cvs] CVS: admin/templates/default account_form.tpl,1.22.4.1,1.22.4.2 account_form_ldap.tpl,1.15.4.1,1.15.4.2
- Previous by thread:
[Phpgroupware-cvs] CVS: admin/templates/default config.tpl,1.14,1.15
- Next by thread:
[Phpgroupware-cvs] CVS: admin/templates/default account_form.tpl,1.22.4.1,1.22.4.2 account_form_ldap.tpl,1.15.4.1,1.15.4.2
- Index(es):