Changeset 11976

Show
Ignore:
Timestamp:
09/03/07 16:32:27 (1 year ago)
Author:
bergie
Message:

Fix ACL checks

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/midcom.admin.folder/handler/edit.php

    r11975 r11976  
    156156    function _handler_edit($handler_id, $args, &$data) 
    157157    { 
    158         $this->_topic->require_do('midgard:update'); 
    159158        $this->_topic->require_do('midcom.admin.folder:topic_management'); 
    160159         
    161160        $this->_handler_id = str_replace('____ais-folder-', '', $handler_id); 
     161         
     162        if ($this->_handler_id == 'create') 
     163        { 
     164            $this->_topic->require_do('midgard:create'); 
     165        } 
     166        else 
     167        { 
     168            $this->_topic->require_do('midgard:update'); 
     169        } 
    162170         
    163171        // Load the DM2 controller 
     
    213221                    { 
    214222                        $this->_new_topic->name = midcom_generate_urlname_from_string($this->_new_topic->extra); 
    215                         $this->_new_topic->update(); 
    216223                    } 
    217224                     
     
    224231        } 
    225232         
    226         if ($handler_id == '____ais-folder-create') 
     233        if ($this->_handler_id == 'create') 
    227234        { 
    228235            $data['title'] = sprintf($_MIDCOM->i18n->get_string('create folder', 'midcom.admin.folder')); 
     
    230237            // Hide the button in toolbar 
    231238            $this->_node_toolbar->hide_item('__ais/folder/create.html'); 
     239             
     240            $this->_topic->require_do('midgard:create'); 
    232241        } 
    233242        else