[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,1.2
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: admin/inc class.boaccounts.inc.php,1.22.2.7,1.22.2.7.2.1 class.uiaccounts.inc.php,1.23.2.9.2.9,1.23.2.9.2.10 |
Date: |
Sat, 17 May 2003 17:27:59 -0400 |
Update of /cvsroot/phpgroupware/admin/inc
In directory subversions:/tmp/cvs-serv23383/inc
Modified Files:
Tag: Version-0_9_16-branch
class.boaccounts.inc.php class.uiaccounts.inc.php
Log Message:
added anonymous user flag in the user-admin
if a user has it checked, he will not show up in list sessions
Index: class.boaccounts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.boaccounts.inc.php,v
retrieving revision 1.22.2.7
retrieving revision 1.22.2.7.2.1
diff -C2 -r1.22.2.7 -r1.22.2.7.2.1
*** class.boaccounts.inc.php 21 Mar 2003 01:15:14 -0000 1.22.2.7
--- class.boaccounts.inc.php 17 May 2003 21:27:56 -0000 1.22.2.7.2.1
***************
*** 318,321 ****
--- 318,322 ----
'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'],
***************
*** 331,334 ****
--- 332,344 ----
{
$account_id =
$this->so->add_user($userData);
+
+ if ($userData['anonymous'])
+ {
+
$GLOBALS['phpgw']->acl->add_repository('phpgwapi','anonymous',$account_id,1);
+ }
+ else
+ {
+
$GLOBALS['phpgw']->acl->delete_repository('phpgwapi','anonymous',$account_id);
+ }
// make this information for the hooks
available
$GLOBALS['hook_values']['account_lid']
= $userData['account_lid'];
***************
*** 546,549 ****
--- 556,560 ----
'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'],
***************
*** 803,806 ****
--- 814,825 ----
$acl->delete_repository('phpgw_group',$groupData['account_id'],$_userData['account_id']);
}
+ }
+ if ($_userData['anonymous'])
+ {
+
$acl->add_repository('phpgwapi','anonymous',$_userData['account_id'],1);
+ }
+ else
+ {
+
$acl->delete_repository('phpgwapi','anonymous',$_userData['account_id']);
}
$GLOBALS['phpgw']->session->delete_cache(intval($_userData['account_id']));
Index: class.uiaccounts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.uiaccounts.inc.php,v
retrieving revision 1.23.2.9.2.9
retrieving revision 1.23.2.9.2.10
diff -C2 -r1.23.2.9.2.9 -r1.23.2.9.2.10
*** class.uiaccounts.inc.php 6 May 2003 17:40:42 -0000 1.23.2.9.2.9
--- class.uiaccounts.inc.php 17 May 2003 21:27:56 -0000 1.23.2.9.2.10
***************
*** 580,583 ****
--- 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'),
***************
*** 595,598 ****
--- 596,603 ----
$var['account_lastname'] = $userData['lastname'];
+ $acl =
CreateObject('phpgwapi.acl',intval($_GET['account_id']));
+ $var['anonymous'] =
$acl->check('anonymous',1,'phpgwapi') ? 'X' : '';
+ unset($acl);
+
if ($userData['status'])
{
***************
*** 664,668 ****
{
$perm_display[$i]['appName'] =
$application[0];
! $perm_display[$i]['translatedName'] =
$application[1]['title'];
$i++;
}
--- 669,673 ----
{
$perm_display[$i]['appName'] =
$application[0];
! $perm_display[$i]['title'] =
$application[1]['title'];
$i++;
}
***************
*** 675,690 ****
@reset($db_perms);
! for ($i=0;$i<=count($perm_display);$i++)
{
! if ($perm_display[$i]['translatedName'])
{
! $part1 =
sprintf("<td>%s</td><td>%s</td>",lang($perm_display[$i]['translatedName']),($_userData['account_permissions'][$perm_display[$i]['appName']]
|| $db_perms[$perm_display[$i]['appName']]?' X':' '));
}
$i++;
! if ($perm_display[$i]['translatedName'])
{
! $part2 =
sprintf("<td>%s</td><td>%s</td>",lang($perm_display[$i]['translatedName']),($_userData['account_permissions'][$perm_display[$i]['appName']]
|| $db_perms[$perm_display[$i]['appName']]?' X':' '));
}
else
--- 680,695 ----
@reset($db_perms);
! for ($i=0;$i<count($perm_display);$i++)
{
! if ($perm_display[$i]['title'])
{
! $part1 =
sprintf("<td>%s</td><td>%s</td>",$perm_display[$i]['title'],($_userData['account_permissions'][$perm_display[$i]['appName']]
|| $db_perms[$perm_display[$i]['appName']]?' X':' '));
}
$i++;
! if ($perm_display[$i]['title'])
{
! $part2 =
sprintf("<td>%s</td><td>%s</td>",$perm_display[$i]['title'],($_userData['account_permissions'][$perm_display[$i]['appName']]
|| $db_perms[$perm_display[$i]['appName']]?' X':' '));
}
else
***************
*** 969,973 ****
$userData['account_expires_day'] =
date('d',$userData['expires'] > 0 ? $userData['expires'] : $time_var);
$userData['account_expires_year'] =
date('Y',$userData['expires'] > 0 ? $userData['expires'] : $time_var);
! }
}
$page_params['menuaction'] =
'admin.boaccounts.'.($_account_id?'edit':'add').'_user';
--- 974,982 ----
$userData['account_expires_day'] =
date('d',$userData['expires'] > 0 ? $userData['expires'] : $time_var);
$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';
***************
*** 993,996 ****
--- 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') */
***************
*** 1057,1060 ****
--- 1067,1071 ----
'homedirectory' => $homedirectory,
'loginshell' => $loginshell,
+ 'anonymous' => '<input type="checkbox"
name="anonymous" value="1"'.($userData['anonymous'] ? ' checked' : '').'>',
'account_status' => '<input type="checkbox"
name="account_status" value="A"'.($userData['status']?' checked':'').'>',
'account_firstname' => '<input
name="account_firstname" value="' . $userData['firstname'] . '">',
***************
*** 1111,1115 ****
{
$perm_display[$i]['appName'] =
$key;
! $perm_display[$i]['translatedName'] =
$application['title'];
$i++;
}
--- 1122,1126 ----
{
$perm_display[$i]['appName'] =
$key;
! $perm_display[$i]['title'] =
$application['title'];
$i++;
}
***************
*** 1124,1131 ****
$checked =
((($userData['account_permissions'][$perm_display[$i]['appName']] ||
$db_perms[$perm_display[$i]['appName']]) && $_account_id)?' checked':'');
! if ($perm_display[$i]['translatedName'])
{
$part[$i&1] =
sprintf('<td>%s</td><td><input type="checkbox" name="account_permissions[%s]"
value="True"%s></td>',
!
$perm_display[$i]['translatedName'],
$perm_display[$i]['appName'],
$checked);
--- 1135,1142 ----
$checked =
((($userData['account_permissions'][$perm_display[$i]['appName']] ||
$db_perms[$perm_display[$i]['appName']]) && $_account_id)?' checked':'');
! if ($perm_display[$i]['title'])
{
$part[$i&1] =
sprintf('<td>%s</td><td><input type="checkbox" name="account_permissions[%s]"
value="True"%s></td>',
! $perm_display[$i]['title'],
$perm_display[$i]['appName'],
$checked);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: admin/inc class.boaccounts.inc.php,1.22.2.7,1.22.2.7.2.1 class.uiaccounts.inc.php,1.23.2.9.2.9,1.23.2.9.2.10,
Ralf Becker <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: phpgwapi/inc class.datetime.inc.php,1.15,1.16
- Next by Date:
[Phpgroupware-cvs] CVS: admin/templates/default account_form.tpl,1.22,1.22.4.1 account_form_ldap.tpl,1.15,1.15.4.1
- Previous by thread:
[Phpgroupware-cvs] CVS: phpgwapi/inc class.datetime.inc.php,1.15,1.16
- Next by thread:
[Phpgroupware-cvs] CVS: admin/templates/default account_form.tpl,1.22,1.22.4.1 account_form_ldap.tpl,1.15,1.15.4.1
- Index(es):