[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: property/inc class.acl2.inc.php, 1.16, 1.17 clas
From: |
Sigurd Nes <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: property/inc class.acl2.inc.php, 1.16, 1.17 class.boadmin.inc.php, 1.13, 1.14 class.bocommon.inc.php, 1.67, 1.68 class.uiadmin.inc.php, 1.16, 1.17 |
Date: |
Tue, 05 Aug 2003 09:32:42 -0400 |
Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv13062/inc
Modified Files:
class.acl2.inc.php class.boadmin.inc.php
class.bocommon.inc.php class.uiadmin.inc.php
Log Message:
no message
Index: class.acl2.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.acl2.inc.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** class.acl2.inc.php 5 Aug 2003 08:24:16 -0000 1.16
--- class.acl2.inc.php 5 Aug 2003 13:32:39 -0000 1.17
***************
*** 22,30 ****
$recieved_args = func_get_args();
$args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
- //_debug_array($args);
$this->db = $GLOBALS['phpgw']->db;
$this->db2 = $this->db;
-
-
$this->account_id = $args['account_id'];
$this->host_id = $args['host_id'];
--- 22,27 ----
***************
*** 59,63 ****
$expected_args[1] =
Array('name'=>'app_id','default'=>$this->app_id, 'type'=>'number');
$expected_args[2] =
Array('name'=>'account_id','default'=>$this->account_id, 'type'=>'number');
! $expected_args[3] =
Array('name'=>'owner_id','default'=>False, 'type'=>'any');
$expected_args[4] =
Array('name'=>'no_effective','default'=>false, 'type'=>'any');
--- 56,60 ----
$expected_args[1] =
Array('name'=>'app_id','default'=>$this->app_id, 'type'=>'number');
$expected_args[2] =
Array('name'=>'account_id','default'=>$this->account_id, 'type'=>'number');
! $expected_args[3] =
Array('name'=>'grantor','default'=>False, 'type'=>'any');
$expected_args[4] =
Array('name'=>'no_effective','default'=>false, 'type'=>'any');
***************
*** 74,89 ****
$sql .= " and acl_location = '". $args['location'] .
"'";
! if($args['owner_id']>0)
{
! $sql .= " and (owner_id=" . $args['owner_id'] .
")";
}
else
{
! $sql .= " and (owner_id is NULL)";
}
$sql .= ') ORDER BY acl_location, acl_type DESC';
- //echo $sql;
$this->db->query($sql,__LINE__,__FILE__);
while($this->db->next_record())
--- 71,85 ----
$sql .= " and acl_location = '". $args['location'] .
"'";
! if($args['grantor']>0)
{
! $sql .= " and (grantor=" . $args['grantor'] .
")";
}
else
{
! $sql .= " and (grantor is NULL)";
}
$sql .= ') ORDER BY acl_location, acl_type DESC';
$this->db->query($sql,__LINE__,__FILE__);
while($this->db->next_record())
***************
*** 120,127 ****
}
- //_debug_array($args);
- //_debug_array($this->rights_cache);
- //_debug_array($this->masks_cache);
-
}
--- 116,119 ----
***************
*** 129,133 ****
function check_grant()
{
! $expected_args[0] =
Array('name'=>'owner_id','default'=>$this->account_id, 'type'=>'number');
$expected_args[1] =
Array('name'=>'location','default'=>'##REQUIRED##', 'type'=>'alphanumeric');
$expected_args[2] =
Array('name'=>'required','default'=>1, 'type'=>'number');
--- 121,125 ----
function check_grant()
{
! $expected_args[0] =
Array('name'=>'grantor','default'=>$this->account_id, 'type'=>'number');
$expected_args[1] =
Array('name'=>'location','default'=>'##REQUIRED##', 'type'=>'alphanumeric');
$expected_args[2] =
Array('name'=>'required','default'=>1, 'type'=>'number');
***************
*** 155,159 ****
}
!
$this->cache_rights($args['location'],$args['app_id'],$args['account_id'],$args['owner_id'],$args['no_effective']);
if($args['acl_type']==0)
{
--- 147,151 ----
}
!
$this->cache_rights($args['location'],$args['app_id'],$args['account_id'],$args['grantor'],$args['no_effective']);
if($args['acl_type']==0)
{
***************
*** 227,231 ****
$sql = "SELECT acl_rights FROM fm_acl2 WHERE (acl_appid
= '".$args['app_id']."' ";
$sql .= " and acl_account = ".$args['account_id'];
! $sql .= " and acl_location = '".$args['location']."'
and acl_type=".$args['type']." and owner_id is NULL)";
$this->db->query($sql,__LINE__,__FILE__);
if($this->db->num_rows() != 0)
--- 219,223 ----
$sql = "SELECT acl_rights FROM fm_acl2 WHERE (acl_appid
= '".$args['app_id']."' ";
$sql .= " and acl_account = ".$args['account_id'];
! $sql .= " and acl_location = '".$args['location']."'
and acl_type=".$args['type']." and grantor is NULL)";
$this->db->query($sql,__LINE__,__FILE__);
if($this->db->num_rows() != 0)
***************
*** 251,263 ****
$expected_args[2] =
Array('name'=>'account_id','default'=>$this->account_id, 'type'=>'number');
$expected_args[3] = Array('name'=>'type','default'=>0,
'type'=>'number');
! $expected_args[4] =
Array('name'=>'app_id','default'=>$this->app_id, 'type'=>'number');
! $expected_args[5] =
Array('name'=>'data','default'=>NULL, 'type'=>'any');
$recieved_args = func_get_args();
$args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
! $owner_id =
$GLOBALS['phpgw_info']['user']['account_id'];
$sql = "SELECT acl_rights, acl_location FROM fm_acl2
WHERE (acl_appid = '".$args['app_id']."' ";
$sql .= " and acl_account = ".$args['account_id'];
! $sql .= " and acl_location = '".$args['location']."'
and acl_type=".$args['type']." and owner_id = $owner_id)";
$this->db->query($sql,__LINE__,__FILE__);
while($this->db->next_record())
--- 243,264 ----
$expected_args[2] =
Array('name'=>'account_id','default'=>$this->account_id, 'type'=>'number');
$expected_args[3] = Array('name'=>'type','default'=>0,
'type'=>'number');
! $expected_args[4] =
Array('name'=>'grantor','default'=>NULL, 'type'=>'any');
! $expected_args[5] =
Array('name'=>'app_id','default'=>$this->app_id, 'type'=>'number');
! $expected_args[6] =
Array('name'=>'data','default'=>NULL, 'type'=>'any');
$recieved_args = func_get_args();
$args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
! if($args['grantor'])
! {
! $grantor = $args['grantor'];
! $grantor_type = 'g';
! }
! else
! {
! $grantor =
$GLOBALS['phpgw_info']['user']['account_id'];
! }
$sql = "SELECT acl_rights, acl_location FROM fm_acl2
WHERE (acl_appid = '".$args['app_id']."' ";
$sql .= " and acl_account = ".$args['account_id'];
! $sql .= " and acl_location = '".$args['location']."'
and acl_type=".$args['type']." and grantor = $grantor)";
$this->db->query($sql,__LINE__,__FILE__);
while($this->db->next_record())
***************
*** 271,275 ****
$sql = "UPDATE fm_acl2 SET acl_rights
=".$args['rights'];
}
! $sql .= " WHERE acl_host=".$this->host_id." AND
acl_appid=".$args['app_id']." AND acl_account=".$args['account_id']." AND
acl_location='".$this->db->f('acl_location')."' AND acl_type=".$args['type'] .
" AND owner_id = $owner_id";
$this->db2->query($sql,__LINE__,__FILE__);
--- 272,276 ----
$sql = "UPDATE fm_acl2 SET acl_rights
=".$args['rights'];
}
! $sql .= " WHERE acl_host=".$this->host_id." AND
acl_appid=".$args['app_id']." AND acl_account=".$args['account_id']." AND
acl_location='".$this->db->f('acl_location')."' AND acl_type=".$args['type'] .
" AND grantor = $grantor";
$this->db2->query($sql,__LINE__,__FILE__);
***************
*** 290,294 ****
}
$add_locations =
explode("-",implode("-",$add_locations));
- //_debug_array($add_locations);
if(is_array($add_locations) && count($add_locations)>0)
{
--- 291,294 ----
***************
*** 300,304 ****
$location
=$add_locations[$j];
}
- //_debug_array($location);
if(strlen($location)>=strlen($args['location']))
--- 300,303 ----
***************
*** 308,318 ****
$sql = "SELECT
acl_rights FROM fm_acl2 WHERE (acl_appid = '".$args['app_id']."' ";
$sql .= " and
acl_account = ".$args['account_id'];
! $sql .= " and
acl_location = '$location' and acl_type=".$args['type']. " AND owner_id =
$owner_id)";
$this->db->query($sql,__LINE__,__FILE__);
- //echo $sql;
if($this->db->num_rows() == 0)
{
! $sql = "INSERT
INTO fm_acl2
(acl_host,acl_appid,acl_account,acl_location,acl_rights,acl_type,acl_data,owner_id)
VALUES
(".$this->host_id.",".$args['app_id'].",".$args['account_id'].",'".$location."',".$args['rights'].",".$args['type'].",'".$args['data']."',$owner_id)";
$this->db2->query($sql,__LINE__,__FILE__);
--- 307,316 ----
$sql = "SELECT
acl_rights FROM fm_acl2 WHERE (acl_appid = '".$args['app_id']."' ";
$sql .= " and
acl_account = ".$args['account_id'];
! $sql .= " and
acl_location = '$location' and acl_type=".$args['type']. " AND grantor =
$grantor)";
$this->db->query($sql,__LINE__,__FILE__);
if($this->db->num_rows() == 0)
{
! $sql = "INSERT
INTO fm_acl2
(acl_host,acl_appid,acl_account,acl_location,acl_rights,acl_type,acl_data,grantor,grantor_type)
VALUES
(".$this->host_id.",".$args['app_id'].",".$args['account_id'].",'".$location."',".$args['rights'].",".$args['type'].",'".$args['data']."',$grantor,'$grantor_type')";
$this->db2->query($sql,__LINE__,__FILE__);
***************
*** 321,325 ****
{
$sql = "UPDATE
fm_acl2 SET acl_rights =".$args['rights'];
! $sql .= " WHERE
acl_host=".$this->host_id." AND acl_appid=".$args['app_id']." AND
acl_account=".$args['account_id']." AND acl_location='".$location."' AND
acl_type=".$args['type'] . " AND owner_id = $owner_id";
$this->db2->query($sql,__LINE__,__FILE__);
}
--- 319,323 ----
{
$sql = "UPDATE
fm_acl2 SET acl_rights =".$args['rights'];
! $sql .= " WHERE
acl_host=".$this->host_id." AND acl_appid=".$args['app_id']." AND
acl_account=".$args['account_id']." AND acl_location='".$location."' AND
acl_type=".$args['type'] . " AND grantor = $grantor";
$this->db2->query($sql,__LINE__,__FILE__);
}
***************
*** 344,351 ****
$recieved_args = func_get_args();
$args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
- //_debug_array($args);
$sql = "SELECT acl_rights, acl_location FROM fm_acl2
WHERE (acl_appid = '".$args['app_id']."' ";
$sql .= " and acl_account = ".$args['account_id'];
! $sql .= " and acl_location = '".$args['location']."'
and acl_type=".$args['type'].")";
$this->db->query($sql,__LINE__,__FILE__);
while($this->db->next_record())
--- 342,348 ----
$recieved_args = func_get_args();
$args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
$sql = "SELECT acl_rights, acl_location FROM fm_acl2
WHERE (acl_appid = '".$args['app_id']."' ";
$sql .= " and acl_account = ".$args['account_id'];
! $sql .= " and acl_location = '".$args['location']."'
and acl_type=".$args['type']." AND grantor is NULL)";
$this->db->query($sql,__LINE__,__FILE__);
while($this->db->next_record())
***************
*** 359,363 ****
$sql = "UPDATE fm_acl2 SET acl_rights
=".$args['rights'];
}
! $sql .= " WHERE acl_host=".$this->host_id." AND
acl_appid=".$args['app_id']." AND acl_account=".$args['account_id']." AND
acl_location='".$this->db->f('acl_location')."' AND acl_type=".$args['type'];
$this->db2->query($sql,__LINE__,__FILE__);
--- 356,360 ----
$sql = "UPDATE fm_acl2 SET acl_rights
=".$args['rights'];
}
! $sql .= " WHERE acl_host=".$this->host_id." AND
acl_appid=".$args['app_id']." AND acl_account=".$args['account_id']." AND
acl_location='".$this->db->f('acl_location')."' AND acl_type=".$args['type'] .
' AND grantor is NULL';
$this->db2->query($sql,__LINE__,__FILE__);
***************
*** 378,382 ****
}
$add_locations =
explode("-",implode("-",$add_locations));
- //_debug_array($add_locations);
if(is_array($add_locations) && count($add_locations)>0)
{
--- 375,378 ----
***************
*** 388,392 ****
$location
=$add_locations[$j];
}
- //_debug_array($location);
if(strlen($location)>=strlen($args['location']))
--- 384,387 ----
***************
*** 396,403 ****
$sql = "SELECT
acl_rights FROM fm_acl2 WHERE (acl_appid = '".$args['app_id']."' ";
$sql .= " and
acl_account = ".$args['account_id'];
! $sql .= " and
acl_location = '$location' and acl_type=".$args['type'].")";
$this->db->query($sql,__LINE__,__FILE__);
-
- //echo $sql;
if($this->db->num_rows() == 0)
{
--- 391,396 ----
$sql = "SELECT
acl_rights FROM fm_acl2 WHERE (acl_appid = '".$args['app_id']."' ";
$sql .= " and
acl_account = ".$args['account_id'];
! $sql .= " and
acl_location = '$location' and acl_type=".$args['type']." AND grantor is NULL
)";
$this->db->query($sql,__LINE__,__FILE__);
if($this->db->num_rows() == 0)
{
***************
*** 409,413 ****
{
$sql = "UPDATE
fm_acl2 SET acl_rights =".$args['rights'];
! $sql .= " WHERE
acl_host=".$this->host_id." AND acl_appid=".$args['app_id']." AND
acl_account=".$args['account_id']." AND acl_location='".$location."' AND
acl_type=".$args['type'];
$this->db2->query($sql,__LINE__,__FILE__);
}
--- 402,406 ----
{
$sql = "UPDATE
fm_acl2 SET acl_rights =".$args['rights'];
! $sql .= " WHERE
acl_host=".$this->host_id." AND acl_appid=".$args['app_id']." AND
acl_account=".$args['account_id']." AND acl_location='".$location."' AND
acl_type=".$args['type'] . ' AND grantor is NULL';
$this->db2->query($sql,__LINE__,__FILE__);
}
***************
*** 435,439 ****
$sql = "SELECT acl_rights FROM fm_acl2 WHERE (acl_appid
= '".$args['app_id']."' ";
$sql .= " and acl_account = ".$args['account_id'];
! $sql .= " and acl_location = '".$args['location']."'
and acl_type=".$args['type']." and owner_id is NULL)";
$this->db->query($sql,__LINE__,__FILE__);
if($this->db->num_rows() != 0)
--- 428,432 ----
$sql = "SELECT acl_rights FROM fm_acl2 WHERE (acl_appid
= '".$args['app_id']."' ";
$sql .= " and acl_account = ".$args['account_id'];
! $sql .= " and acl_location = '".$args['location']."'
and acl_type=".$args['type']." and grantor is NULL)";
$this->db->query($sql,__LINE__,__FILE__);
if($this->db->num_rows() != 0)
***************
*** 449,453 ****
$sql = "DELETE FROM fm_acl2";
}
! $sql .= " WHERE acl_host=".$this->host_id." AND
acl_appid=".$args['app_id']." AND acl_account=".$args['account_id']." AND
acl_location='".$args['location']."' AND acl_type=".$args['type'] . ' and
owner_id is NULL';
$this->db->query($sql,__LINE__,__FILE__);
$this->rights_cache = Array();
--- 442,446 ----
$sql = "DELETE FROM fm_acl2";
}
! $sql .= " WHERE acl_host=".$this->host_id." AND
acl_appid=".$args['app_id']." AND acl_account=".$args['account_id']." AND
acl_location LIKE '%".$args['location']."%' AND acl_type=".$args['type'] . '
and grantor is NULL';
$this->db->query($sql,__LINE__,__FILE__);
$this->rights_cache = Array();
***************
*** 462,475 ****
$expected_args[2] =
Array('name'=>'account_id','default'=>$this->account_id, 'type'=>'number');
$expected_args[3] = Array('name'=>'type','default'=>0,
'type'=>'number');
! $expected_args[4] =
Array('name'=>'app_id','default'=>$this->app_id, 'type'=>'number');
! $expected_args[5] =
Array('name'=>'data','default'=>NULL, 'type'=>'any');
$recieved_args = func_get_args();
$args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
! $owner_id =
$GLOBALS['phpgw_info']['user']['account_id'];
$sql = "SELECT acl_rights FROM fm_acl2 WHERE (acl_appid
= '".$args['app_id']."' ";
$sql .= " and acl_account = ".$args['account_id'];
! $sql .= " and acl_location = '".$args['location']."'
and acl_type=".$args['type']." and owner_id = $owner_id)";
$this->db->query($sql,__LINE__,__FILE__);
if($this->db->num_rows() != 0)
--- 455,476 ----
$expected_args[2] =
Array('name'=>'account_id','default'=>$this->account_id, 'type'=>'number');
$expected_args[3] = Array('name'=>'type','default'=>0,
'type'=>'number');
! $expected_args[4] =
Array('name'=>'grantor','default'=>NULL, 'type'=>'any');
! $expected_args[5] =
Array('name'=>'app_id','default'=>$this->app_id, 'type'=>'number');
! $expected_args[6] =
Array('name'=>'data','default'=>NULL, 'type'=>'any');
$recieved_args = func_get_args();
$args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
! if($args['grantor'])
! {
! $grantor = $args['grantor'];
! }
! else
! {
! $grantor =
$GLOBALS['phpgw_info']['user']['account_id'];
! }
$sql = "SELECT acl_rights FROM fm_acl2 WHERE (acl_appid
= '".$args['app_id']."' ";
$sql .= " and acl_account = ".$args['account_id'];
! $sql .= " and acl_location = '".$args['location']."'
and acl_type=".$args['type']." and grantor = $grantor)";
$this->db->query($sql,__LINE__,__FILE__);
if($this->db->num_rows() != 0)
***************
*** 485,489 ****
$sql = "DELETE FROM fm_acl2";
}
! $sql .= " WHERE acl_host=".$this->host_id." AND
acl_appid=".$args['app_id']." AND acl_account=".$args['account_id']." AND
acl_location='".$args['location']."' AND acl_type=".$args['type'] . " and
owner_id = $owner_id";
$this->db->query($sql,__LINE__,__FILE__);
$this->rights_cache = Array();
--- 486,490 ----
$sql = "DELETE FROM fm_acl2";
}
! $sql .= " WHERE acl_host=".$this->host_id." AND
acl_appid=".$args['app_id']." AND acl_account=".$args['account_id']." AND
acl_location LIKE '%".$args['location']."%' AND acl_type=".$args['type'] . "
and grantor = $grantor";
$this->db->query($sql,__LINE__,__FILE__);
$this->rights_cache = Array();
***************
*** 539,543 ****
function get_grants($app='',$location='')
{
-
if ($app=='')
{
--- 540,543 ----
***************
*** 547,551 ****
$app_id =
$GLOBALS['phpgw']->applications->data[$app]['id'];
! $sql = "select owner_id as grantor, acl_rights from
fm_acl2 where acl_appid = $app_id AND acl_type=0 and acl_location =
'$location' AND owner_id is NOT NULL AND"
. " fm_acl2.acl_account in ";
$security = "(". $this->account_id ."";
--- 547,551 ----
$app_id =
$GLOBALS['phpgw']->applications->data[$app]['id'];
! $sql = "select grantor,grantor_type, acl_rights from
fm_acl2 where acl_appid = $app_id AND acl_type=0 and acl_location =
'$location' AND grantor is NOT NULL AND"
. " fm_acl2.acl_account in ";
$security = "(". $this->account_id ."";
***************
*** 553,557 ****
$my_memberships =
$myaccounts->membership($this->account_id);
! unset($myaccounts);
@reset($my_memberships);
while($my_memberships && list($key,$group) =
each($my_memberships))
--- 553,557 ----
$my_memberships =
$myaccounts->membership($this->account_id);
! // unset($myaccounts);
@reset($my_memberships);
while($my_memberships && list($key,$group) =
each($my_memberships))
***************
*** 573,587 ****
$rights = $this->db2->f('acl_rights');
! $accounts[$grantor] = Array($grantor);
! foreach($accounts[$grantor] as $grantors)
{
! if(!isset($grants[$grantors]))
{
! $grants[$grantors] = 0;
}
! $grants[$grantors] |= $rights;
}
- reset($accounts[$grantor]);
}
--- 573,607 ----
$rights = $this->db2->f('acl_rights');
! $grantor_type = $this->db2->f('grantor_type');
! if($grantor_type =='g')
{
! $grantor_members =
$myaccounts->member($grantor);
!
! foreach($grantor_members as $grantor)
{
!
$accounts[$grantor['account_id']] = array($grantor['account_id']);
!
!
if(!isset($grants[$grantor['account_id']]))
! {
!
$grants[$grantor['account_id']] = 0;
! }
! $grants[$grantor['account_id']]
|= $rights;
!
reset($accounts[$grantor['account_id']]);
! }
! }
! else
! {
! $accounts[$grantor] = Array($grantor);
! foreach($accounts[$grantor] as
$grantors)
! {
! if(!isset($grants[$grantors]))
! {
! $grants[$grantors] = 0;
! }
! $grants[$grantors] |= $rights;
}
! reset($accounts[$grantor]);
}
}
Index: class.boadmin.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boadmin.inc.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** class.boadmin.inc.php 27 Jul 2003 15:53:24 -0000 1.13
--- class.boadmin.inc.php 5 Aug 2003 13:32:39 -0000 1.14
***************
*** 41,44 ****
--- 41,45 ----
// $location =
get_var('location',array('POST','GET')); // don't work for some reason...
$module = get_var('module',array('POST','GET'));
+ $granting_group =
get_var('granting_group',array('POST','GET'));
if ($start)
***************
*** 75,78 ****
--- 76,83 ----
$this->location = $module;
}
+ if(isset($granting_group))
+ {
+ $this->granting_group = $granting_group;
+ }
}
***************
*** 90,93 ****
--- 95,99 ----
$this->cat_id = $data['cat_id'];
$this->location = $data['location'];
+ $this->granting_group = $data['granting_group'];
}
***************
*** 264,268 ****
$user_checked[]=$user_id;
!
$this->acl2->set_grant($this->location,$rights,$user_id,$type);
}
--- 270,274 ----
$user_checked[]=$user_id;
!
$this->acl2->set_grant($this->location,$rights,$user_id,$type,$this->granting_group);
}
***************
*** 327,331 ****
for ($j=0;$j<count($right);$j++)
{
!
$this->acl2->remove_grant($this->location,$right[$j],$user_delete[$i],$type);
}
}
--- 333,337 ----
for ($j=0;$j<count($right);$j++)
{
!
$this->acl2->remove_grant($this->location,$right[$j],$user_delete[$i],$type,$this->granting_group);
}
}
***************
*** 334,339 ****
function get_user_list($type='',$app_id='')
{
!
! $owner = $GLOBALS['phpgw_info']['user']['account_id'];
$right=$this->right;
--- 340,351 ----
function get_user_list($type='',$app_id='')
{
! if($this->granting_group)
! {
! $owner = $this->granting_group;
! }
! else
! {
! $owner =
$GLOBALS['phpgw_info']['user']['account_id'];
! }
$right=$this->right;
***************
*** 394,398 ****
}
-
$this->total_records = $this->total_records +
count($user_list);
--- 406,409 ----
***************
*** 458,462 ****
$this->total_records = $this->total_records +
count($user_list);
- //_debug_array($user_list);
return $user_list;
--- 469,472 ----
***************
*** 475,479 ****
}
-
}
?>
--- 485,488 ----
Index: class.bocommon.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bocommon.inc.php,v
retrieving revision 1.67
retrieving revision 1.68
diff -C2 -r1.67 -r1.68
*** class.bocommon.inc.php 27 Jul 2003 15:53:24 -0000 1.67
--- class.bocommon.inc.php 5 Aug 2003 13:32:39 -0000 1.68
***************
*** 180,183 ****
--- 180,229 ----
}
+ function get_group_list($format='',$selected='')
+ {
+ switch($format)
+ {
+ case 'select':
+
$GLOBALS['phpgw']->xslttpl->add_file(array('group_select'));
+ break;
+ case 'filter':
+
$GLOBALS['phpgw']->xslttpl->add_file(array('group_filter'));
+ break;
+ }
+
+ $users = $this->accounts->get_list('groups', $start,
$sort, $order, $query);
+
+ if (isSet($users) AND is_array($users))
+ {
+ foreach($users as $user)
+ {
+ $sel_user = '';
+ if ($user['account_id']==$selected)
+ {
+ $sel_user = 'selected';
+ }
+
+ $user_list[] = array
+ (
+ 'id' => $user['account_id'],
+ 'name' =>
$user['account_firstname'],
+ 'selected' => $sel_user
+ );
+ }
+ }
+
+ $user_count= count($user_list);
+ for ($i=0;$i<$user_count;$i++)
+ {
+ if ($user_list[$i]['selected'] != 'selected')
+ {
+ unset($user_list[$i]['selected']);
+ }
+ }
+
+ //_debug_array($user_list);
+ return $user_list;
+ }
+
function
get_user_list_right($right='',$selected='',$acl_location='')
Index: class.uiadmin.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiadmin.inc.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** class.uiadmin.inc.php 27 Jul 2003 15:53:24 -0000 1.16
--- class.uiadmin.inc.php 5 Aug 2003 13:32:39 -0000 1.17
***************
*** 45,48 ****
--- 45,49 ----
$this->cat_id =
$this->bo->cat_id;
$this->location =
$this->bo->location;
+ $this->granting_group =
$this->bo->granting_group;
}
***************
*** 57,61 ****
'filter' => $this->filter,
'cat_id' => $this->cat_id,
! 'location' => $this->location
);
--- 58,63 ----
'filter' => $this->filter,
'cat_id' => $this->cat_id,
! 'location' => $this->location,
! 'granting_group' =>
$this->granting_group
);
***************
*** 173,183 ****
(
'menuaction' =>
$this->currentapp.'.uiadmin.aclprefs',
! 'sort'
=>$this->sort,
! 'order'
=>$this->order,
! 'cat_id'
=>$this->cat_id,
! 'filter'
=>$this->filter,
! 'query'
=>$this->query,
! 'module' =>
$this->location
!
);
--- 175,185 ----
(
'menuaction' =>
$this->currentapp.'.uiadmin.aclprefs',
! 'sort'
=>$this->sort,
! 'order'
=>$this->order,
! 'cat_id'
=>$this->cat_id,
! 'filter'
=>$this->filter,
! 'query'
=>$this->query,
! 'module'
=> $this->location,
! 'granting_group' =>
$this->granting_group
);
***************
*** 216,219 ****
--- 218,222 ----
'cat_id'
=> $this->cat_id,
'permission'
=> False,
+ 'grant'
=> 1,
'lang_searchfield_statustext' => lang('Enter
the search string. To show all entries, empty this field and press the SUBMIT
button again'),
***************
*** 227,231 ****
'lang_location_statustext' =>
lang('Select submodule'),
'select_name_location' =>
'module',
! 'location_list'
=> $this->bo->select_location('filter',$this->location,True)
);
--- 230,240 ----
'lang_location_statustext' =>
lang('Select submodule'),
'select_name_location' =>
'module',
! 'location_list'
=> $this->bo->select_location('filter',$this->location,True),
!
! 'is_admin'
=> $GLOBALS['phpgw_info']['user']['apps']['admin'],
! 'lang_group_statustext' =>
lang('Select the granting group. To do not use a granting group select NO
GRANTING GROUP'),
! 'select_group_name'
=> 'granting_group',
! 'lang_no_group'
=> lang('No granting group'),
! 'group_list'
=> $this->bocommon->get_group_list('filter',$this->granting_group),
);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: property/inc class.acl2.inc.php, 1.16, 1.17 class.boadmin.inc.php, 1.13, 1.14 class.bocommon.inc.php, 1.67, 1.68 class.uiadmin.inc.php, 1.16, 1.17,
Sigurd Nes <address@hidden> <=