phpBMS

Changeset 522 for trunk/phpbms/include

Show
Ignore:
Timestamp:
05/07/09 17:21:06 (3 years ago)
Author:
nate
Message:
  • Consolidated code and changed variable names in hasRights to make clearer.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/phpbms/include/common_functions.php

    r521 r522  
    210210} 
    211211 
    212 function hasRights($roleid,$checkForAdmin = true){ 
     212function hasRights($roleid,$fullAccessAdmin = true){ 
    213213        $hasrights=false; 
    214214 
    215         if($_SESSION["userinfo"]["admin"]==1 && $checkForAdmin) 
     215        if($_SESSION["userinfo"]["admin"]==1 && ($fullAccessAdmin || $roleid == -100)) 
    216216                $hasrights=true; 
    217         elseif($_SESSION["userinfo"]["admin"] == 1 && $roleid == -100)//-100 is a special value for admin 
    218                 $hasrights = true; 
    219217        elseif($roleid==0) 
    220218                $hasrights=true; 
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.