phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: sitemgr/inc class.Common_UI.inc.php,1.10,1.11 cl


From: Michael Totschnig <address@hidden>
Subject: [Phpgroupware-cvs] CVS: sitemgr/inc class.Common_UI.inc.php,1.10,1.11 class.Sites_BO.inc.php,1.1,1.2 class.Sites_UI.inc.php,1.1,1.2
Date: Wed, 21 May 2003 23:06:16 -0400

Update of /cvsroot/phpgroupware/sitemgr/inc
In directory subversions:/tmp/cvs-serv8648/inc

Modified Files:
        class.Common_UI.inc.php class.Sites_BO.inc.php 
        class.Sites_UI.inc.php 
Log Message:
strip forgotten testing code from Common_UI, wrap ACL around Sites_UI


Index: class.Common_UI.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/inc/class.Common_UI.inc.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** class.Common_UI.inc.php     22 May 2003 02:36:53 -0000      1.10
--- class.Common_UI.inc.php     22 May 2003 03:06:14 -0000      1.11
***************
*** 308,312 ****
                function DisplayFooter()
                {
- echo (int)substr($GLOBALS['phpgw_info']['server']['versions']['phpgwapi'],4);
                        
$this->t->set_file('sitemgr_footer','sitemgr_footer.tpl');
                        $this->t->pfp('out','sitemgr_footer');
--- 308,311 ----

Index: class.Sites_BO.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/inc/class.Sites_BO.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** class.Sites_BO.inc.php      22 May 2003 02:36:53 -0000      1.1
--- class.Sites_BO.inc.php      22 May 2003 03:06:14 -0000      1.2
***************
*** 146,150 ****
                function delete($id)
                {
-                       //TODO: add ACL!!!!!
                        $this->so->delete($id);
                        
$GLOBALS['Common_BO']->cats->removeCategory($id,True,True);
--- 146,149 ----

Index: class.Sites_UI.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/inc/class.Sites_UI.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** class.Sites_UI.inc.php      22 May 2003 02:36:53 -0000      1.1
--- class.Sites_UI.inc.php      22 May 2003 03:06:14 -0000      1.2
***************
*** 18,22 ****
                        'list_sites' => True,
                        'edit'         => True,
-                       'add'          => True,
                        'delete'       => True
                );
--- 18,21 ----
***************
*** 75,78 ****
--- 74,82 ----
                        echo parse_navbar();
  
+                       if (!$GLOBALS['phpgw']->acl->check('run',1,'admin'))
+                       {
+                               $this->deny();
+                       }
+ 
                        
$GLOBALS['phpgw']->template->set_file(array('site_list_t' => 'listsites.tpl'));
                        
$GLOBALS['phpgw']->template->set_block('site_list_t','site_list','list');
***************
*** 135,138 ****
--- 139,151 ----
                function edit()
                {
+ 
+                       $GLOBALS['phpgw']->common->phpgw_header();
+                       echo parse_navbar();
+ 
+                       if (!$GLOBALS['phpgw']->acl->check('run',1,'admin'))
+                       {
+                               $this->deny();
+                       }
+ 
                        if ($_POST['done'])
                        {
***************
*** 176,182 ****
                        }
  
-                       $GLOBALS['phpgw']->common->phpgw_header();
-                       echo parse_navbar();
- 
                        
$GLOBALS['phpgw']->template->set_var('title_sites',$site_id ? lang('Edit 
Website') : lang('Add Website'));
                        
--- 189,192 ----
***************
*** 252,255 ****
--- 262,272 ----
                function delete()
                {
+                       if (!$GLOBALS['phpgw']->acl->check('run',1,'admin'))
+                       {
+                               $GLOBALS['phpgw']->common->phpgw_header();
+                               echo parse_navbar();
+                               $this->deny();
+                       }
+ 
                        $site_id = get_var('site_id',array('POST','GET'));
                        if ($_POST['yes'] || $_POST['no'])
***************
*** 277,280 ****
--- 294,303 ----
                                
$GLOBALS['phpgw']->template->pparse('phpgw_body','site_delete');
                        }
+               }
+ 
+               function deny()
+               {
+                       echo '<p><center><b>'.lang('Access not 
permitted').'</b></center>';
+                       $GLOBALS['phpgw']->common->phpgw_exit(True);
                }
        }





reply via email to

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