[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [11038] property: optional bypass acl for tikcets
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [11038] property: optional bypass acl for tikcets |
Date: |
Mon, 08 Apr 2013 13:30:08 +0000 |
Revision: 11038
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11038
Author: sigurdne
Date: 2013-04-08 13:30:07 +0000 (Mon, 08 Apr 2013)
Log Message:
-----------
property: optional bypass acl for tikcets
Modified Paths:
--------------
trunk/property/inc/class.sotts.inc.php
Modified: trunk/property/inc/class.sotts.inc.php
===================================================================
--- trunk/property/inc/class.sotts.inc.php 2013-04-08 13:10:30 UTC (rev
11037)
+++ trunk/property/inc/class.sotts.inc.php 2013-04-08 13:30:07 UTC (rev
11038)
@@ -141,15 +141,6 @@
$branch_id = isset($data['branch_id']) &&
$data['branch_id'] ? (int)$data['branch_id']:0;
$order_dim1 = isset($data['order_dim1']) &&
$data['order_dim1'] ? (int)$data['order_dim1']:0;
- $this->grants =
$GLOBALS['phpgw']->session->appsession('grants_ticket','property');
-
- if(!$this->grants)
- {
-
$GLOBALS['phpgw']->acl->set_account_id($this->account);
- $this->grants =
$GLOBALS['phpgw']->acl->get_grants('property','.ticket');
-
$GLOBALS['phpgw']->session->appsession('grants_ticket','property',$this->grants);
- }
-
$result_order_field = '';
if ($order)
{
@@ -183,44 +174,53 @@
$GLOBALS['phpgw']->config->read();
- $public_user_list = array();
-
if(isset($GLOBALS['phpgw']->config->config_data['acl_at_tts_category']) &&
$GLOBALS['phpgw']->config->config_data['acl_at_tts_category'])
+
if(!isset($GLOBALS['phpgw']->config->config_data['bypass_acl_at_tickets']) ||
!$GLOBALS['phpgw']->config->config_data['bypass_acl_at_tickets'])
{
- $categories =
$GLOBALS['phpgw']->locations->get_subs('property', '.ticket.category');
+ $this->grants =
$GLOBALS['phpgw']->session->appsession('grants_ticket','property');
- $category_grants = array();
- foreach ($categories as $location)
+ if(!$this->grants)
{
- $category_grants =
array_merge($category_grants,
$GLOBALS['phpgw']->acl->get_grants('property',$location));
+
$GLOBALS['phpgw']->acl->set_account_id($this->account);
+ $this->grants =
$GLOBALS['phpgw']->acl->get_grants('property','.ticket');
+
$GLOBALS['phpgw']->session->appsession('grants_ticket','property',$this->grants);
}
- foreach($category_grants as $user => $right)
+ $public_user_list = array();
+
if(isset($GLOBALS['phpgw']->config->config_data['acl_at_tts_category']) &&
$GLOBALS['phpgw']->config->config_data['acl_at_tts_category'])
{
- $public_user_list[] = $user;
+ $categories =
$GLOBALS['phpgw']->locations->get_subs('property', '.ticket.category');
+
+ $category_grants = array();
+ foreach ($categories as $location)
+ {
+ $category_grants =
array_merge($category_grants,
$GLOBALS['phpgw']->acl->get_grants('property',$location));
+ }
+
+ foreach($category_grants as $user =>
$right)
+ {
+ $public_user_list[] = $user;
+ }
}
- }
-
if(isset($GLOBALS['phpgw']->config->config_data['acl_at_location']) &&
$GLOBALS['phpgw']->config->config_data['acl_at_location'])
- {
- $access_location =
execMethod('property.socommon.get_location_list', PHPGW_ACL_READ);
- if($access_location)
+
if(isset($GLOBALS['phpgw']->config->config_data['acl_at_location']) &&
$GLOBALS['phpgw']->config->config_data['acl_at_location'])
{
- $filtermethod .= " $where
fm_tts_tickets.loc1 in ('" . implode("','", $access_location) . "')";
- $where= 'AND';
+ $access_location =
execMethod('property.socommon.get_location_list', PHPGW_ACL_READ);
+ if($access_location)
+ {
+ $filtermethod .= " $where
fm_tts_tickets.loc1 in ('" . implode("','", $access_location) . "')";
+ $where= 'AND';
+ }
}
- }
- if (is_array($this->grants))
- {
- $grants = & $this->grants;
- foreach($grants as $user => $right)
+ if (is_array($this->grants))
{
- $public_user_list[] = $user;
+ $grants = & $this->grants;
+ foreach($grants as $user => $right)
+ {
+ $public_user_list[] = $user;
+ }
}
- }
-
if(!isset($GLOBALS['phpgw']->config->config_data['bypass_acl_at_tickets']) ||
!$GLOBALS['phpgw']->config->config_data['bypass_acl_at_tickets'])
- {
if($public_user_list)
{
$public_user_list =
array_unique($public_user_list);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [11038] property: optional bypass acl for tikcets,
Sigurd Nes <=