[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.11, 1.12 clas
From: |
Sigurd Nes <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: property/inc class.acl2.inc.php, 1.11, 1.12 class.boadmin.inc.php, 1.10, 1.11 |
Date: |
Fri, 18 Jul 2003 14:10:05 -0400 |
Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv29386/inc
Modified Files:
class.acl2.inc.php class.boadmin.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.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** class.acl2.inc.php 14 Jul 2003 09:07:41 -0000 1.11
--- class.acl2.inc.php 18 Jul 2003 18:10:03 -0000 1.12
***************
*** 53,57 ****
}
! function cache_rights()
{
$expected_args[0] =
Array('name'=>'location','default'=>'##REQUIRED##', 'type'=>'alphanumeric');
--- 53,57 ----
}
! function cache_rights_org()
{
$expected_args[0] =
Array('name'=>'location','default'=>'##REQUIRED##', 'type'=>'alphanumeric');
***************
*** 114,117 ****
--- 114,173 ----
}
+ function cache_rights()
+ {
+ $expected_args[0] =
Array('name'=>'location','default'=>'##REQUIRED##', 'type'=>'alphanumeric');
+ $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'=>'number');
+
+ $recieved_args = func_get_args();
+ $args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
+
+
if(isset($this->rights_cache[$args['app_id']][$args['account_id']][$args['location']]))
+ {
+ return;
+ }
+
+ $sql = "SELECT
acl_rights,acl_type,acl_data,acl_location FROM fm_acl2 WHERE (acl_appid =
'".$args['app_id']."' ";
+ $sql .= " and (acl_account in
(".$args['account_id']."".$this->memberships_sql.'))';
+ $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__);
+ $this->db->next_record();
+
if($this->rights_cache[$args['app_id']][$args['account_id']][$args['location']]
== 0)
+ {
+
$this->masks_cache[$args['app_id']][$args['account_id']][$this->db->f('acl_location')]
= 0;
+
$this->rights_cache[$args['app_id']][$args['account_id']][$this->db->f('acl_location')]
= 0;
+ }
+
+ if((int)$this->db->f('acl_type') == 0)
+ {
+
$this->rights_cache[$args['app_id']][$args['account_id']][$this->db->f('acl_location')]
=
$this->bit_set($this->rights_cache[$args['app_id']][$args['account_id']][$this->db->f('acl_location')],(int)$this->db->f('acl_rights'));
+ }
+ else
+ {
+
$this->masks_cache[$args['app_id']][$args['account_id']][$this->db->f('acl_location')]
=
$this->bit_set($this->rights_cache[$args['app_id']][$args['account_id']][$this->db->f('acl_location')],(int)$this->db->f('acl_rights'));
+ }
+ if(!$this->db->f('acl_rights'))
+ {
+
$this->rights_cache[$args['app_id']][$args['account_id']][$args['location']]=0;
+
+ }
+ //_debug_array($this->rights_cache);
+
+ }
+
function get_location_list()
{
***************
*** 123,127 ****
$recieved_args = func_get_args();
$args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
-
if(!strstr($args['location'], '.'))
{
--- 179,182 ----
***************
*** 212,216 ****
$recieved_args = func_get_args();
$args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
-
if(!$args['no_membership'])
{
--- 267,270 ----
***************
*** 453,456 ****
--- 507,511 ----
$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'];
Index: class.boadmin.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boadmin.inc.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** class.boadmin.inc.php 10 Jul 2003 21:11:38 -0000 1.10
--- class.boadmin.inc.php 18 Jul 2003 18:10:03 -0000 1.11
***************
*** 229,233 ****
}
-
// $this->acl2->check('.invoice.test', $rights,$user_id);
// echo 'rights_cache:<pre>'; print_r($this->acl2->rights_cache); echo
'</pre>';
--- 229,232 ----
***************
*** 391,395 ****
}
- //_debug_array($this->app_id);
if(is_array($users))
{
--- 390,393 ----
***************
*** 446,450 ****
}
-
$this->total_records = count($user_list);
--- 444,447 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: property/inc class.acl2.inc.php, 1.11, 1.12 class.boadmin.inc.php, 1.10, 1.11,
Sigurd Nes <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: property/inc class.uidocument.inc.php, 1.15, 1.16 class.uidrawing.inc.php, 1.23, 1.24 class.uiequipment.inc.php, 1.31, 1.32 class.uigab.inc.php, 1.13, 1.14 class.uiinvestment.inc.php, 1.25, 1.26 class.uiinvoice.inc.php, 1.30, 1.31 class.uilocation.inc.php, 1.21, 1.22 class.uimeter.inc.php, 1.15, 1.16 class.uipricebook.inc.php, 1.17, 1.18 class.uiproject.inc.php, 1.36, 1.37 class.uireport.inc.php, 1.12, 1.13 class.uirequest.inc.php, 1.24, 1.25 class.uistandard_entity.inc.php, 1.14, 1.15 class.uitts.inc.php, 1.35, 1.36 class.uiwo_hour.inc.php, 1.31, 1.32 class.uiworkorder.inc.php, 1.30, 1.31
- Next by Date:
[Phpgroupware-cvs] CVS: property/inc class.acl2.inc.php,1.12,1.13
- Previous by thread:
[Phpgroupware-cvs] CVS: property/inc class.uidocument.inc.php, 1.15, 1.16 class.uidrawing.inc.php, 1.23, 1.24 class.uiequipment.inc.php, 1.31, 1.32 class.uigab.inc.php, 1.13, 1.14 class.uiinvestment.inc.php, 1.25, 1.26 class.uiinvoice.inc.php, 1.30, 1.31 class.uilocation.inc.php, 1.21, 1.22 class.uimeter.inc.php, 1.15, 1.16 class.uipricebook.inc.php, 1.17, 1.18 class.uiproject.inc.php, 1.36, 1.37 class.uireport.inc.php, 1.12, 1.13 class.uirequest.inc.php, 1.24, 1.25 class.uistandard_entity.inc.php, 1.14, 1.15 class.uitts.inc.php, 1.35, 1.36 class.uiwo_hour.inc.php, 1.31, 1.32 class.uiworkorder.inc.php, 1.30, 1.31
- Next by thread:
[Phpgroupware-cvs] CVS: property/inc class.acl2.inc.php,1.12,1.13
- Index(es):