[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: phpwebhosting index.php,1.35,1.36
From: |
Jason Wies <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: phpwebhosting index.php,1.35,1.36 |
Date: |
Sun, 23 Jun 2002 23:19:02 -0400 |
Update of /cvsroot/phpgroupware/phpwebhosting
In directory subversions:/tmp/cvs-serv14257/phpwebhosting
Modified Files:
index.php
Log Message:
Savannah Patch #370 (modified) - Fix and extend ACL - Thanks gisu
Index: index.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpwebhosting/index.php,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -r1.35 -r1.36
*** index.php 18 Jun 2002 06:33:44 -0000 1.35
--- index.php 24 Jun 2002 03:18:59 -0000 1.36
***************
*** 180,199 ****
###
! # Get their memberships to be used throughout the script
###
! $memberships = $GLOBALS['phpgw']->accounts->membership
($GLOBALS['userinfo']['username']);
! if (!is_array ($memberships))
{
! $memberships = array ();
}
! while (list ($num, $group_array) = each ($memberships))
{
! $membership_id = $GLOBALS['phpgw']->accounts->name2id
($group_array['account_name']);
! $group_applications = CreateObject('phpgwapi.applications',
$membership_id);
! $membership_applications[$group_array['account_name']] =
$group_applications->read_account_specific ();
}
--- 180,212 ----
###
! # Get their readable groups to be used throughout the script
###
! $groups = array ();
! $groups = $GLOBALS['phpgw']->accounts->get_list ('groups');
!
! $readable_groups = array ();
!
! while (list ($num, $account) = each ($groups))
{
! if ($GLOBALS['phpgw']->vfs->acl_check (array (
! 'owner_id' => $account['account_id'],
! 'operation' => PHPGW_ACL_READ
! ))
! )
! {
! $readable_groups[$account['account_lid']] = Array('account_id'
=> $account['account_id'], 'account_name' => $account['account_lid']);
! }
}
! $groups_applications = array ();
!
! while (list ($num, $group_array) = each ($readable_groups))
{
! $group_id = $GLOBALS['phpgw']->accounts->name2id
($group_array['account_name']);
! $applications = CreateObject('phpgwapi.applications', $group_id);
! $groups_applications[$group_array['account_name']] =
$applications->read_account_specific ();
}
***************
*** 279,282 ****
--- 292,309 ----
###
+ # Check available permissions for $path, so we can disable unusable
operations in user interface
+ ###
+
+ if ($GLOBALS['phpgw']->vfs->acl_check (array (
+ 'string' => $path,
+ 'relatives' => array (RELATIVE_NONE),
+ 'operation' => PHPGW_ACL_ADD
+ ))
+ )
+ {
+ $can_add = True;
+ }
+
+ ###
# Default is to sort by name
###
***************
*** 326,331 ****
// $numoffiles = count($ls_array);
! reset ($memberships);
! while (list ($num, $group_array) = each ($memberships))
{
###
--- 353,358 ----
// $numoffiles = count($ls_array);
! reset ($readable_groups);
! while (list ($num, $group_array) = each ($readable_groups))
{
###
***************
*** 333,337 ****
###
! if
(!$membership_applications[$group_array['account_name']][$GLOBALS['appname']]['enabled'])
{
continue;
--- 360,364 ----
###
! if
(!$groups_applications[$group_array['account_name']][$GLOBALS['appname']]['enabled'])
{
continue;
***************
*** 1045,1049 ****
html_form_input ('submit', 'copy', lang('Copy to:'));
html_help_link ('copy_to');
-
html_form_input ('submit', 'move', lang('Move to:'));
html_help_link ('move_to');
--- 1072,1075 ----
***************
*** 1076,1084 ****
###
! # Then we get the directories in their membership's home
directories
###
! reset ($memberships);
! while (list ($num, $group_array) = each ($memberships))
{
###
--- 1102,1110 ----
###
! # Then we get the directories in their readable groups' home
directories
###
! reset ($readable_groups);
! while (list ($num, $group_array) = each ($readable_groups))
{
###
***************
*** 1086,1090 ****
###
! if
(!$membership_applications[$group_array['account_name']][$GLOBALS['appname']]['enabled'])
{
continue;
--- 1112,1116 ----
###
! if
(!$groups_applications[$group_array['account_name']][$GLOBALS['appname']]['enabled'])
{
continue;
***************
*** 1149,1155 ****
html_nbsp (3);
! html_form_input ('text', 'createdir', NULL, 255, 15);
! html_form_input ('submit', 'newdir', lang('Create
Folder'));
! html_help_link ('create_folder');
}
--- 1175,1184 ----
html_nbsp (3);
! if ($can_add)
! {
! html_form_input ('text', 'createdir', NULL,
255, 15);
! html_form_input ('submit', 'newdir',
lang('Create Folder'));
! html_help_link ('create_folder');
! }
}
***************
*** 1158,1162 ****
html_help_link ('update');
! if ($path != '/' && $path != $GLOBALS['fakebase'])
{
html_nbsp (3);
--- 1187,1191 ----
html_help_link ('update');
! if ($path != '/' && $path != $GLOBALS['fakebase'] && $can_add)
{
html_nbsp (3);
***************
*** 1211,1215 ****
###
! if ($path != '/' && $path != $GLOBALS['fakebase'])
{
html_break (2);
--- 1240,1244 ----
###
! if ($path != '/' && $path != $GLOBALS['fakebase'] && $can_add)
{
html_break (2);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: phpwebhosting index.php,1.35,1.36,
Jason Wies <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: calendar/inc class.boicalendar.inc.php,1.16.2.2,1.16.2.3 class.uiicalendar.inc.php,1.3.2.1,1.3.2.2
- Next by Date:
[Phpgroupware-cvs] CVS: phpgwapi/inc class.vfs_sql.inc.php,1.20,1.21
- Previous by thread:
[Phpgroupware-cvs] CVS: calendar/inc class.boicalendar.inc.php,1.16.2.2,1.16.2.3 class.uiicalendar.inc.php,1.3.2.1,1.3.2.2
- Next by thread:
[Phpgroupware-cvs] CVS: phpgwapi/inc class.vfs_sql.inc.php,1.20,1.21
- Index(es):