phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] api/class.account_mgr.php, 1.1.2.36


From: nomail
Subject: [Phpgroupware-cvs] api/class.account_mgr.php, 1.1.2.36
Date: Sun, 23 May 2004 13:09:02 -0000

Update of /api
Modified Files:
        Branch: proposal-branch
          class.account_mgr.php

date: 2004/05/08 07:43:22;  author: jengo;  state: Exp;  lines: +29 -4

Log Message:
View account is now showing the proper permissions for the account
=====================================================================
Index: api/class.account_mgr.php
diff -u api/class.account_mgr.php:1.1.2.35 api/class.account_mgr.php:1.1.2.36
--- api/class.account_mgr.php:1.1.2.35  Sat May  8 06:00:10 2004
+++ api/class.account_mgr.php   Sat May  8 07:43:22 2004
@@ -306,8 +306,6 @@
 
                                                        if 
($dbresult->numrows() && 
$GLOBALS['phpgw']->acl->check($key,$dbresult->fields['loc_value'],$dbresult->fields['loc_value']))
                                                        {
-//                                                     if 
($this->db->num_rows() && 
$GLOBALS['phpgw']->acl->check($key,$this->db->f('loc_value'),$this->db->f('loc_value')))
-//                                                     {
                                                                
$acl->set($key,$dbresult->fields['loc_value'],0,1);
                                                        }
                                                }
@@ -320,6 +318,8 @@
                                                $obj = 
createObject('api_history');
                                                $obj->set('api.accounts.' . 
$account_id,$history_data,array());
                                                
$GLOBALS['msgbox']->add(lang('Account has been created successfully'), 
'notice');
+
+                                               return $this->view($account_id);
                                        }
                                }
 
@@ -481,7 +481,32 @@
                        $obj->field_execMethod['account_status'] = 
'api.account_mgr._account_status';
                        $result['history_data'] = $obj->get('api.accounts.' . 
$args['account_id']);
 
-                       $result['acl_options']  = 
execMethod('api.acl_mgr.basic',array('account_id' => $args['account_id'], 
'acl_check' => false));
+                       $dbresult = $GLOBALS['phpgw']->db->execute("
+                               SELECT
+                                       loc_op,
+                                       loc_title,
+                                       loc_value
+                               FROM
+                                       phpgw_acl_locations
+                               WHERE
+                                       loc_op NOT LIKE '%.%.%'
+                               ORDER BY
+                                       loc_title");
+
+                       while (! $dbresult->EOF)
+                       {
+                               if 
($GLOBALS['phpgw']->acl->check_specific($dbresult->fields['loc_op'],$dbresult->fields['loc_value'],$args['account_id'],1))
+                               {
+                                       $result['acl_options'][] = array
+                                       (
+                                               'op'    => 
$dbresult->fields['loc_op'],
+                                               'title' => 
lang($dbresult->fields['loc_title'])
+                                       );
+                               }
+                               $dbresult->movenext();
+                       }
+
+                       //$result['acl_options']  = 
execMethod('api.acl_mgr.basic',array('account_id' => 
$args['account_id'],'check_acl' => true));
                        $result['datamine']     = 
execMethod('api.datamine._get','api.account_mgr.' . $args['account_id']);
                        $result['datamine_location']  = 'api.account_mgr.view.' 
. $args['account_id'];
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]