Show
Ignore:
Timestamp:
04/28/05 14:17:51 (8 years ago)
Author:
fproulx
Message:

2005-04-28 Fran�ois Proulx <francois.proulx@…>

  • Added check in MainUI toolbar so that it won't show "NOT logged in ?" message when connect to a real hotspot ( not virtual )
    • This message confused many users ( they clicked and got the virtual login instead ! )
  • Hide adminstration features ( statistics, hotspot creation, network wide content etc...) from all but Super admins
  • Fixed getAllLocativeArtisticContent in Node.php added is_persistent check
  • Added $associate_existing_content parameter to processNewContentUI to allows reuse for existing content ( in ContentGroup? )
  • Fixed bug in FlickrPhotoStream? delete ( missing return from parent )
  • Added security check in all content classes ( ProcessAdminUI )
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog-auth/wifidog/classes/MainUI.php

    r592 r593  
    5656                        $html = ''; 
    5757                        $html .= "<ul>\n"; 
    58                         $html .= "<li><a href='user_log.php'>"._("User logs")."</a></li>\n"; 
    59                         $html .= "<li><a href='online_users.php'>"._("Online Users")."</a></li>\n"; 
    60                         $html .= "<li><a href='user_stats.php'>"._("Cumulative user statistics")."</a></li>\n"; 
    61                         $html .= "<li><a href='hotspot_log.php'>"._("Hotspot logs")."</a></li>\n"; 
    62                         $html .= "<li><a href='import_user_database.php'>"._("Import NoCat user database")."</a></li>\n"; 
    63                         $html .= "<li><a href='hotspot.php'>"._("Hotspot creation and configuration")."</a> - Beta</li>\n"; 
    64                         $html .= "<li><a href='owner_sendfiles.php'>"._("Hotspot owner administration")."</a> - Beta</li>\n"; 
     58             
     59            if($current_user->isSuperAdmin()) 
     60            { 
     61                        $html .= "<li><a href='user_log.php'>"._("User logs")."</a></li>\n"; 
     62                        $html .= "<li><a href='online_users.php'>"._("Online Users")."</a></li>\n"; 
     63                        $html .= "<li><a href='user_stats.php'>"._("Cumulative user statistics")."</a></li>\n"; 
     64                        $html .= "<li><a href='hotspot_log.php'>"._("Hotspot logs")."</a></li>\n"; 
     65                        $html .= "<li><a href='import_user_database.php'>"._("Import NoCat user database")."</a></li>\n"; 
     66                        $html .= "<li><a href='hotspot.php'>"._("Hotspot creation and configuration")."</a> - Beta</li>\n"; 
     67                        $html .= "<li><a href='owner_sendfiles.php'>"._("Hotspot owner administration")."</a> - Beta</li>\n"; 
     68            } 
    6569 
    6670                        /* Node admin */ 
     
    9397 
    9498                        /* Network admin */ 
    95                         $html .= "<div class='admin_section_container'>\n"; 
    96                         $html .= '<form action="'.GENERIC_OBJECT_ADMIN_ABS_HREF.'" method="post">'; 
    97                         $html .= "<div class='admin_section_title'>"._("Network administration:")." </div>\n"; 
    98  
    99                         $html .= "<div class='admin_section_data'>\n"; 
    100                         $html .= "<input type='hidden' name='action' value='edit'>\n"; 
    101                         $html .= "<input type='hidden' name='object_class' value='Network'><br>\n"; 
    102                         $html .= Network :: getSelectNetworkUI('object_id'); 
    103                         $html .= "</div>\n"; 
    104                         $html .= "<div class='admin_section_tools'>\n"; 
    105  
    106                         $html .= "<input type=submit name='edit_submit' value='"._("Edit")."'>\n"; 
    107                         $html .= "</div>\n"; 
    108                         $html .= '</form>'; 
    109                         $html .= "</div>\n"; 
     99            if($current_user->isSuperAdmin()) 
     100            { 
     101                        $html .= "<div class='admin_section_container'>\n"; 
     102                        $html .= '<form action="'.GENERIC_OBJECT_ADMIN_ABS_HREF.'" method="post">'; 
     103                        $html .= "<div class='admin_section_title'>"._("Network administration:")." </div>\n"; 
     104     
     105                        $html .= "<div class='admin_section_data'>\n"; 
     106                        $html .= "<input type='hidden' name='action' value='edit'>\n"; 
     107                        $html .= "<input type='hidden' name='object_class' value='Network'><br>\n"; 
     108                        $html .= Network :: getSelectNetworkUI('object_id'); 
     109                        $html .= "</div>\n"; 
     110                        $html .= "<div class='admin_section_tools'>\n"; 
     111     
     112                        $html .= "<input type=submit name='edit_submit' value='"._("Edit")."'>\n"; 
     113                        $html .= "</div>\n"; 
     114                        $html .= '</form>'; 
     115                        $html .= "</div>\n"; 
     116            } 
    110117 
    111118                        $html .= "<li><a href='content_admin.php'>"._("Content manager")."</a></li>\n"; 
     
    148155                        else 
    149156                        { 
    150                                 $append_gateway = ""; 
    151                                 if(!empty($_REQUEST['gw_id'])) 
    152                                         $append_gateway .= "?gw_id=".$_REQUEST['gw_id']; 
    153                                 $html .= '<p>'._("NOT logged in.").' <a href="'.BASE_SSL_PATH.'login/'.$append_gateway.'">'. ("Login?").'</a></p>'."\n"; 
     157                // If the user connects physically ( through a gateway don't show the confusing login message )  
     158                if(empty($_REQUEST['gw_id']) || empty($_REQUEST['gw_address']) || empty($_REQUEST['gw_port']))  
     159                    $html .= '<p>'._("NOT logged in.").' <a href="'.BASE_SSL_PATH.'login/">'. ("Login?").'</a></p>'."\n"; 
    154160                                $html .= '<a class="administration" HREF="'.Network :: getCurrentNetwork()->getHomepageURL().'"><img class="administration" src="/images/lien_ext.gif"> '.Network :: getCurrentNetwork()->getName().'</a>'."\n"; 
    155161                                $html .= '<a class="administration" HREF="'.BASE_SSL_PATH.'faq.php"><img class="administration" src="/images/where.gif"> '._("Where am I?").'</a>'."\n";