Changeset 1322

Show
Ignore:
Timestamp:
11/30/07 18:07:15 (1 year ago)
Author:
rho
Message:

Fixed #159, allow admins to access restricted posts/pages

  • Added admin check to access_level_check
  • Added admin check to access_level_sql_where

Signed-off: Rolando Espinoza La Fuente <darkrho@gmail.com>

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/mod/users/lib/function_access_level_check.php

    r1301 r1322  
    55 
    66if (isset($parameter) && $parameter != "") { 
    7     if ($parameter == "PUBLIC") { 
     7    if (isloggedin() && isadmin($_SESSION['userid'])) { 
     8        $run_result = true; 
     9    } 
     10    elseif ($parameter == "PUBLIC") { 
    811        $run_result = true; 
    912    } else if ($parameter == "LOGGED_IN" && isset($_SESSION['userid']) && $_SESSION['userid'] != "" && $_SESSION['userid'] != -1) { 
  • devel/mod/users/lib/function_access_level_sql_where.php

    r1301 r1322  
    55        $run_result = " access = 'PUBLIC' "; 
    66     
    7         if (logged_on) { 
     7        if (isloggedin() && isadmin($_SESSION['userid'])) { 
     8            $run_result = ' 1=1 '; // allow admins to access any object 
     9        } 
     10        elseif (isloggedin()) { 
    811             
    912            $run_result = " owner = " . $_SESSION['userid'] . " ";